// This file is generated by rust-protobuf 3.3.0. 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(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]

//! Generated file from `messages-tezos.proto`

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

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

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

impl TezosGetAddress {
    pub fn new() -> TezosGetAddress {
        ::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 bool chunkify = 3;

    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(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &TezosGetAddress| { &m.address_n },
            |m: &mut TezosGetAddress| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_display",
            |m: &TezosGetAddress| { &m.show_display },
            |m: &mut TezosGetAddress| { &mut m.show_display },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &TezosGetAddress| { &m.chunkify },
            |m: &mut TezosGetAddress| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosGetAddress>(
            "TezosGetAddress",
            fields,
            oneofs,
        )
    }
}

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

    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()?);
                },
                24 => {
                    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.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.chunkify {
            os.write_bool(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() -> TezosGetAddress {
        TezosGetAddress::new()
    }

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

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

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

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

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

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

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

impl TezosAddress {
    pub fn new() -> TezosAddress {
        ::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())
    }

    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::<_, _>(
            "address",
            |m: &TezosAddress| { &m.address },
            |m: &mut TezosAddress| { &mut m.address },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosAddress>(
            "TezosAddress",
            fields,
            oneofs,
        )
    }
}

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

    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()?);
                },
                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);
        }
        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)?;
        }
        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() -> TezosAddress {
        TezosAddress::new()
    }

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

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

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

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

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

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

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

impl TezosGetPublicKey {
    pub fn new() -> TezosGetPublicKey {
        ::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 bool chunkify = 3;

    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(3);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &TezosGetPublicKey| { &m.address_n },
            |m: &mut TezosGetPublicKey| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_display",
            |m: &TezosGetPublicKey| { &m.show_display },
            |m: &mut TezosGetPublicKey| { &mut m.show_display },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &TezosGetPublicKey| { &m.chunkify },
            |m: &mut TezosGetPublicKey| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosGetPublicKey>(
            "TezosGetPublicKey",
            fields,
            oneofs,
        )
    }
}

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

    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()?);
                },
                24 => {
                    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.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.chunkify {
            os.write_bool(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() -> TezosGetPublicKey {
        TezosGetPublicKey::new()
    }

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

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

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

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

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

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

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

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

    // required string public_key = 1;

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

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

    pub fn has_public_key(&self) -> bool {
        self.public_key.is_some()
    }

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

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

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

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

    fn is_initialized(&self) -> bool {
        if self.public_key.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.public_key = ::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.public_key.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

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

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

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

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

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TezosSignTx {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.branch)
    pub branch: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.reveal)
    pub reveal: ::protobuf::MessageField<tezos_sign_tx::TezosRevealOp>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.transaction)
    pub transaction: ::protobuf::MessageField<tezos_sign_tx::TezosTransactionOp>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.origination)
    pub origination: ::protobuf::MessageField<tezos_sign_tx::TezosOriginationOp>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.delegation)
    pub delegation: ::protobuf::MessageField<tezos_sign_tx::TezosDelegationOp>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.proposal)
    pub proposal: ::protobuf::MessageField<tezos_sign_tx::TezosProposalOp>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.ballot)
    pub ballot: ::protobuf::MessageField<tezos_sign_tx::TezosBallotOp>,
    // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.chunkify)
    pub chunkify: ::std::option::Option<bool>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes branch = 2;

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

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

    pub fn has_branch(&self) -> bool {
        self.branch.is_some()
    }

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

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

    // optional bool chunkify = 9;

    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(9);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &TezosSignTx| { &m.address_n },
            |m: &mut TezosSignTx| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "branch",
            |m: &TezosSignTx| { &m.branch },
            |m: &mut TezosSignTx| { &mut m.branch },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_sign_tx::TezosRevealOp>(
            "reveal",
            |m: &TezosSignTx| { &m.reveal },
            |m: &mut TezosSignTx| { &mut m.reveal },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_sign_tx::TezosTransactionOp>(
            "transaction",
            |m: &TezosSignTx| { &m.transaction },
            |m: &mut TezosSignTx| { &mut m.transaction },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_sign_tx::TezosOriginationOp>(
            "origination",
            |m: &TezosSignTx| { &m.origination },
            |m: &mut TezosSignTx| { &mut m.origination },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_sign_tx::TezosDelegationOp>(
            "delegation",
            |m: &TezosSignTx| { &m.delegation },
            |m: &mut TezosSignTx| { &mut m.delegation },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_sign_tx::TezosProposalOp>(
            "proposal",
            |m: &TezosSignTx| { &m.proposal },
            |m: &mut TezosSignTx| { &mut m.proposal },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_sign_tx::TezosBallotOp>(
            "ballot",
            |m: &TezosSignTx| { &m.ballot },
            |m: &mut TezosSignTx| { &mut m.ballot },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &TezosSignTx| { &m.chunkify },
            |m: &mut TezosSignTx| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosSignTx>(
            "TezosSignTx",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.branch.is_none() {
            return false;
        }
        for v in &self.reveal {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.transaction {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.origination {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.delegation {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.proposal {
            if !v.is_initialized() {
                return false;
            }
        };
        for v in &self.ballot {
            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.branch = ::std::option::Option::Some(is.read_bytes()?);
                },
                26 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.reveal)?;
                },
                34 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.transaction)?;
                },
                42 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.origination)?;
                },
                50 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.delegation)?;
                },
                58 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.proposal)?;
                },
                66 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.ballot)?;
                },
                72 => {
                    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.branch.as_ref() {
            my_size += ::protobuf::rt::bytes_size(2, &v);
        }
        if let Some(v) = self.reveal.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.transaction.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.origination.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.delegation.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.proposal.as_ref() {
            let len = v.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        }
        if let Some(v) = self.ballot.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;
        }
        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.branch.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.reveal.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        }
        if let Some(v) = self.transaction.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?;
        }
        if let Some(v) = self.origination.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
        }
        if let Some(v) = self.delegation.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
        }
        if let Some(v) = self.proposal.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
        }
        if let Some(v) = self.ballot.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
        }
        if let Some(v) = self.chunkify {
            os.write_bool(9, 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() -> TezosSignTx {
        TezosSignTx::new()
    }

    fn clear(&mut self) {
        self.address_n.clear();
        self.branch = ::std::option::Option::None;
        self.reveal.clear();
        self.transaction.clear();
        self.origination.clear();
        self.delegation.clear();
        self.proposal.clear();
        self.ballot.clear();
        self.chunkify = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static TezosSignTx {
        static instance: TezosSignTx = TezosSignTx {
            address_n: ::std::vec::Vec::new(),
            branch: ::std::option::Option::None,
            reveal: ::protobuf::MessageField::none(),
            transaction: ::protobuf::MessageField::none(),
            origination: ::protobuf::MessageField::none(),
            delegation: ::protobuf::MessageField::none(),
            proposal: ::protobuf::MessageField::none(),
            ballot: ::protobuf::MessageField::none(),
            chunkify: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

/// Nested message and enums of message `TezosSignTx`
pub mod tezos_sign_tx {
    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosContractID)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosContractID {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosContractID.tag)
        pub tag: ::std::option::Option<::protobuf::EnumOrUnknown<tezos_contract_id::TezosContractType>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosContractID.hash)
        pub hash: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosContractID.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required .hw.trezor.messages.tezos.TezosSignTx.TezosContractID.TezosContractType tag = 1;

        pub fn tag(&self) -> tezos_contract_id::TezosContractType {
            match self.tag {
                Some(e) => e.enum_value_or(tezos_contract_id::TezosContractType::Implicit),
                None => tezos_contract_id::TezosContractType::Implicit,
            }
        }

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

        pub fn has_tag(&self) -> bool {
            self.tag.is_some()
        }

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

        // required bytes hash = 2;

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

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

        pub fn has_hash(&self) -> bool {
            self.hash.is_some()
        }

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

        // Take field
        pub fn take_hash(&mut self) -> ::std::vec::Vec<u8> {
            self.hash.take().unwrap_or_else(|| ::std::vec::Vec::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::<_, _>(
                "tag",
                |m: &TezosContractID| { &m.tag },
                |m: &mut TezosContractID| { &mut m.tag },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "hash",
                |m: &TezosContractID| { &m.hash },
                |m: &mut TezosContractID| { &mut m.hash },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosContractID>(
                "TezosSignTx.TezosContractID",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.tag.is_none() {
                return false;
            }
            if self.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 {
                    8 => {
                        self.tag = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                    },
                    18 => {
                        self.hash = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    tag => {
                        ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                    },
                };
            }
            ::std::result::Result::Ok(())
        }

        // Compute sizes of nested messages
        #[allow(unused_variables)]
        fn compute_size(&self) -> u64 {
            let mut my_size = 0;
            if let Some(v) = self.tag {
                my_size += ::protobuf::rt::int32_size(1, v.value());
            }
            if let Some(v) = self.hash.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.tag {
                os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?;
            }
            if let Some(v) = self.hash.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() -> TezosContractID {
            TezosContractID::new()
        }

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

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

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

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

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

    /// Nested message and enums of message `TezosContractID`
    pub mod tezos_contract_id {
        #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
        // @@protoc_insertion_point(enum:hw.trezor.messages.tezos.TezosSignTx.TezosContractID.TezosContractType)
        pub enum TezosContractType {
            // @@protoc_insertion_point(enum_value:hw.trezor.messages.tezos.TezosSignTx.TezosContractID.TezosContractType.Implicit)
            Implicit = 0,
            // @@protoc_insertion_point(enum_value:hw.trezor.messages.tezos.TezosSignTx.TezosContractID.TezosContractType.Originated)
            Originated = 1,
        }

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

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

            fn from_i32(value: i32) -> ::std::option::Option<TezosContractType> {
                match value {
                    0 => ::std::option::Option::Some(TezosContractType::Implicit),
                    1 => ::std::option::Option::Some(TezosContractType::Originated),
                    _ => ::std::option::Option::None
                }
            }

            fn from_str(str: &str) -> ::std::option::Option<TezosContractType> {
                match str {
                    "Implicit" => ::std::option::Option::Some(TezosContractType::Implicit),
                    "Originated" => ::std::option::Option::Some(TezosContractType::Originated),
                    _ => ::std::option::Option::None
                }
            }

            const VALUES: &'static [TezosContractType] = &[
                TezosContractType::Implicit,
                TezosContractType::Originated,
            ];
        }

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

            fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
                let index = *self as usize;
                Self::enum_descriptor().value_by_index(index)
            }
        }

        impl ::std::default::Default for TezosContractType {
            fn default() -> Self {
                TezosContractType::Implicit
            }
        }

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

    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosRevealOp {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.source)
        pub source: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.fee)
        pub fee: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.counter)
        pub counter: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.gas_limit)
        pub gas_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.storage_limit)
        pub storage_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.public_key)
        pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosRevealOp.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes source = 7;

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

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

        pub fn has_source(&self) -> bool {
            self.source.is_some()
        }

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

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

        // required uint64 fee = 2;

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

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

        pub fn has_fee(&self) -> bool {
            self.fee.is_some()
        }

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

        // required uint64 counter = 3;

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

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

        pub fn has_counter(&self) -> bool {
            self.counter.is_some()
        }

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

        // required uint64 gas_limit = 4;

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

        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: u64) {
            self.gas_limit = ::std::option::Option::Some(v);
        }

        // required uint64 storage_limit = 5;

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

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

        pub fn has_storage_limit(&self) -> bool {
            self.storage_limit.is_some()
        }

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

        // required bytes public_key = 6;

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

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

        pub fn has_public_key(&self) -> bool {
            self.public_key.is_some()
        }

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(6);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "source",
                |m: &TezosRevealOp| { &m.source },
                |m: &mut TezosRevealOp| { &mut m.source },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "fee",
                |m: &TezosRevealOp| { &m.fee },
                |m: &mut TezosRevealOp| { &mut m.fee },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "counter",
                |m: &TezosRevealOp| { &m.counter },
                |m: &mut TezosRevealOp| { &mut m.counter },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "gas_limit",
                |m: &TezosRevealOp| { &m.gas_limit },
                |m: &mut TezosRevealOp| { &mut m.gas_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "storage_limit",
                |m: &TezosRevealOp| { &m.storage_limit },
                |m: &mut TezosRevealOp| { &mut m.storage_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "public_key",
                |m: &TezosRevealOp| { &m.public_key },
                |m: &mut TezosRevealOp| { &mut m.public_key },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosRevealOp>(
                "TezosSignTx.TezosRevealOp",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.source.is_none() {
                return false;
            }
            if self.fee.is_none() {
                return false;
            }
            if self.counter.is_none() {
                return false;
            }
            if self.gas_limit.is_none() {
                return false;
            }
            if self.storage_limit.is_none() {
                return false;
            }
            if self.public_key.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 {
                    58 => {
                        self.source = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    16 => {
                        self.fee = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    24 => {
                        self.counter = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    32 => {
                        self.gas_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    40 => {
                        self.storage_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    50 => {
                        self.public_key = ::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.source.as_ref() {
                my_size += ::protobuf::rt::bytes_size(7, &v);
            }
            if let Some(v) = self.fee {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            if let Some(v) = self.counter {
                my_size += ::protobuf::rt::uint64_size(3, v);
            }
            if let Some(v) = self.gas_limit {
                my_size += ::protobuf::rt::uint64_size(4, v);
            }
            if let Some(v) = self.storage_limit {
                my_size += ::protobuf::rt::uint64_size(5, v);
            }
            if let Some(v) = self.public_key.as_ref() {
                my_size += ::protobuf::rt::bytes_size(6, &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.source.as_ref() {
                os.write_bytes(7, v)?;
            }
            if let Some(v) = self.fee {
                os.write_uint64(2, v)?;
            }
            if let Some(v) = self.counter {
                os.write_uint64(3, v)?;
            }
            if let Some(v) = self.gas_limit {
                os.write_uint64(4, v)?;
            }
            if let Some(v) = self.storage_limit {
                os.write_uint64(5, v)?;
            }
            if let Some(v) = self.public_key.as_ref() {
                os.write_bytes(6, 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() -> TezosRevealOp {
            TezosRevealOp::new()
        }

        fn clear(&mut self) {
            self.source = ::std::option::Option::None;
            self.fee = ::std::option::Option::None;
            self.counter = ::std::option::Option::None;
            self.gas_limit = ::std::option::Option::None;
            self.storage_limit = ::std::option::Option::None;
            self.public_key = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TezosRevealOp {
            static instance: TezosRevealOp = TezosRevealOp {
                source: ::std::option::Option::None,
                fee: ::std::option::Option::None,
                counter: ::std::option::Option::None,
                gas_limit: ::std::option::Option::None,
                storage_limit: ::std::option::Option::None,
                public_key: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosTransactionOp {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.source)
        pub source: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.fee)
        pub fee: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.counter)
        pub counter: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.gas_limit)
        pub gas_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.storage_limit)
        pub storage_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.amount)
        pub amount: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.destination)
        pub destination: ::protobuf::MessageField<TezosContractID>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.parameters)
        pub parameters: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.parameters_manager)
        pub parameters_manager: ::protobuf::MessageField<tezos_transaction_op::TezosParametersManager>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes source = 9;

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

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

        pub fn has_source(&self) -> bool {
            self.source.is_some()
        }

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

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

        // required uint64 fee = 2;

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

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

        pub fn has_fee(&self) -> bool {
            self.fee.is_some()
        }

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

        // required uint64 counter = 3;

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

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

        pub fn has_counter(&self) -> bool {
            self.counter.is_some()
        }

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

        // required uint64 gas_limit = 4;

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

        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: u64) {
            self.gas_limit = ::std::option::Option::Some(v);
        }

        // required uint64 storage_limit = 5;

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

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

        pub fn has_storage_limit(&self) -> bool {
            self.storage_limit.is_some()
        }

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

        // required uint64 amount = 6;

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

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

        pub fn has_amount(&self) -> bool {
            self.amount.is_some()
        }

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

        // optional bytes parameters = 8;

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

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

        pub fn has_parameters(&self) -> bool {
            self.parameters.is_some()
        }

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(9);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "source",
                |m: &TezosTransactionOp| { &m.source },
                |m: &mut TezosTransactionOp| { &mut m.source },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "fee",
                |m: &TezosTransactionOp| { &m.fee },
                |m: &mut TezosTransactionOp| { &mut m.fee },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "counter",
                |m: &TezosTransactionOp| { &m.counter },
                |m: &mut TezosTransactionOp| { &mut m.counter },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "gas_limit",
                |m: &TezosTransactionOp| { &m.gas_limit },
                |m: &mut TezosTransactionOp| { &mut m.gas_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "storage_limit",
                |m: &TezosTransactionOp| { &m.storage_limit },
                |m: &mut TezosTransactionOp| { &mut m.storage_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "amount",
                |m: &TezosTransactionOp| { &m.amount },
                |m: &mut TezosTransactionOp| { &mut m.amount },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, TezosContractID>(
                "destination",
                |m: &TezosTransactionOp| { &m.destination },
                |m: &mut TezosTransactionOp| { &mut m.destination },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "parameters",
                |m: &TezosTransactionOp| { &m.parameters },
                |m: &mut TezosTransactionOp| { &mut m.parameters },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_transaction_op::TezosParametersManager>(
                "parameters_manager",
                |m: &TezosTransactionOp| { &m.parameters_manager },
                |m: &mut TezosTransactionOp| { &mut m.parameters_manager },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosTransactionOp>(
                "TezosSignTx.TezosTransactionOp",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.source.is_none() {
                return false;
            }
            if self.fee.is_none() {
                return false;
            }
            if self.counter.is_none() {
                return false;
            }
            if self.gas_limit.is_none() {
                return false;
            }
            if self.storage_limit.is_none() {
                return false;
            }
            if self.amount.is_none() {
                return false;
            }
            if self.destination.is_none() {
                return false;
            }
            for v in &self.destination {
                if !v.is_initialized() {
                    return false;
                }
            };
            for v in &self.parameters_manager {
                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 {
                    74 => {
                        self.source = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    16 => {
                        self.fee = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    24 => {
                        self.counter = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    32 => {
                        self.gas_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    40 => {
                        self.storage_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    48 => {
                        self.amount = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    58 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.destination)?;
                    },
                    66 => {
                        self.parameters = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    82 => {
                        ::protobuf::rt::read_singular_message_into_field(is, &mut self.parameters_manager)?;
                    },
                    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.source.as_ref() {
                my_size += ::protobuf::rt::bytes_size(9, &v);
            }
            if let Some(v) = self.fee {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            if let Some(v) = self.counter {
                my_size += ::protobuf::rt::uint64_size(3, v);
            }
            if let Some(v) = self.gas_limit {
                my_size += ::protobuf::rt::uint64_size(4, v);
            }
            if let Some(v) = self.storage_limit {
                my_size += ::protobuf::rt::uint64_size(5, v);
            }
            if let Some(v) = self.amount {
                my_size += ::protobuf::rt::uint64_size(6, v);
            }
            if let Some(v) = self.destination.as_ref() {
                let len = v.compute_size();
                my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
            }
            if let Some(v) = self.parameters.as_ref() {
                my_size += ::protobuf::rt::bytes_size(8, &v);
            }
            if let Some(v) = self.parameters_manager.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<()> {
            if let Some(v) = self.source.as_ref() {
                os.write_bytes(9, v)?;
            }
            if let Some(v) = self.fee {
                os.write_uint64(2, v)?;
            }
            if let Some(v) = self.counter {
                os.write_uint64(3, v)?;
            }
            if let Some(v) = self.gas_limit {
                os.write_uint64(4, v)?;
            }
            if let Some(v) = self.storage_limit {
                os.write_uint64(5, v)?;
            }
            if let Some(v) = self.amount {
                os.write_uint64(6, v)?;
            }
            if let Some(v) = self.destination.as_ref() {
                ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
            }
            if let Some(v) = self.parameters.as_ref() {
                os.write_bytes(8, v)?;
            }
            if let Some(v) = self.parameters_manager.as_ref() {
                ::protobuf::rt::write_message_field_with_cached_size(10, 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() -> TezosTransactionOp {
            TezosTransactionOp::new()
        }

        fn clear(&mut self) {
            self.source = ::std::option::Option::None;
            self.fee = ::std::option::Option::None;
            self.counter = ::std::option::Option::None;
            self.gas_limit = ::std::option::Option::None;
            self.storage_limit = ::std::option::Option::None;
            self.amount = ::std::option::Option::None;
            self.destination.clear();
            self.parameters = ::std::option::Option::None;
            self.parameters_manager.clear();
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TezosTransactionOp {
            static instance: TezosTransactionOp = TezosTransactionOp {
                source: ::std::option::Option::None,
                fee: ::std::option::Option::None,
                counter: ::std::option::Option::None,
                gas_limit: ::std::option::Option::None,
                storage_limit: ::std::option::Option::None,
                amount: ::std::option::Option::None,
                destination: ::protobuf::MessageField::none(),
                parameters: ::std::option::Option::None,
                parameters_manager: ::protobuf::MessageField::none(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    /// Nested message and enums of message `TezosTransactionOp`
    pub mod tezos_transaction_op {
        // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager)
        #[derive(PartialEq,Clone,Default,Debug)]
        pub struct TezosParametersManager {
            // message fields
            // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.set_delegate)
            pub set_delegate: ::std::option::Option<::std::vec::Vec<u8>>,
            // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.cancel_delegate)
            pub cancel_delegate: ::std::option::Option<bool>,
            // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.transfer)
            pub transfer: ::protobuf::MessageField<tezos_parameters_manager::TezosManagerTransfer>,
            // special fields
            // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.special_fields)
            pub special_fields: ::protobuf::SpecialFields,
        }

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

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

            // optional bytes set_delegate = 1;

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

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

            pub fn has_set_delegate(&self) -> bool {
                self.set_delegate.is_some()
            }

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

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

            // optional bool cancel_delegate = 2;

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

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

            pub fn has_cancel_delegate(&self) -> bool {
                self.cancel_delegate.is_some()
            }

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

            pub(in super::super) 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::<_, _>(
                    "set_delegate",
                    |m: &TezosParametersManager| { &m.set_delegate },
                    |m: &mut TezosParametersManager| { &mut m.set_delegate },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                    "cancel_delegate",
                    |m: &TezosParametersManager| { &m.cancel_delegate },
                    |m: &mut TezosParametersManager| { &mut m.cancel_delegate },
                ));
                fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, tezos_parameters_manager::TezosManagerTransfer>(
                    "transfer",
                    |m: &TezosParametersManager| { &m.transfer },
                    |m: &mut TezosParametersManager| { &mut m.transfer },
                ));
                ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosParametersManager>(
                    "TezosSignTx.TezosTransactionOp.TezosParametersManager",
                    fields,
                    oneofs,
                )
            }
        }

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

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

            fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
                while let Some(tag) = is.read_raw_tag_or_eof()? {
                    match tag {
                        10 => {
                            self.set_delegate = ::std::option::Option::Some(is.read_bytes()?);
                        },
                        16 => {
                            self.cancel_delegate = ::std::option::Option::Some(is.read_bool()?);
                        },
                        26 => {
                            ::protobuf::rt::read_singular_message_into_field(is, &mut self.transfer)?;
                        },
                        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.set_delegate.as_ref() {
                    my_size += ::protobuf::rt::bytes_size(1, &v);
                }
                if let Some(v) = self.cancel_delegate {
                    my_size += 1 + 1;
                }
                if let Some(v) = self.transfer.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<()> {
                if let Some(v) = self.set_delegate.as_ref() {
                    os.write_bytes(1, v)?;
                }
                if let Some(v) = self.cancel_delegate {
                    os.write_bool(2, v)?;
                }
                if let Some(v) = self.transfer.as_ref() {
                    ::protobuf::rt::write_message_field_with_cached_size(3, 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() -> TezosParametersManager {
                TezosParametersManager::new()
            }

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

            fn default_instance() -> &'static TezosParametersManager {
                static instance: TezosParametersManager = TezosParametersManager {
                    set_delegate: ::std::option::Option::None,
                    cancel_delegate: ::std::option::Option::None,
                    transfer: ::protobuf::MessageField::none(),
                    special_fields: ::protobuf::SpecialFields::new(),
                };
                &instance
            }
        }

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

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

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

        /// Nested message and enums of message `TezosParametersManager`
        pub mod tezos_parameters_manager {
            // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.TezosManagerTransfer)
            #[derive(PartialEq,Clone,Default,Debug)]
            pub struct TezosManagerTransfer {
                // message fields
                // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.TezosManagerTransfer.destination)
                pub destination: ::protobuf::MessageField<super::super::TezosContractID>,
                // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.TezosManagerTransfer.amount)
                pub amount: ::std::option::Option<u64>,
                // special fields
                // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.TezosParametersManager.TezosManagerTransfer.special_fields)
                pub special_fields: ::protobuf::SpecialFields,
            }

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

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

                // required uint64 amount = 2;

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

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

                pub fn has_amount(&self) -> bool {
                    self.amount.is_some()
                }

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

                pub(in super::super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
                    let mut fields = ::std::vec::Vec::with_capacity(2);
                    let mut oneofs = ::std::vec::Vec::with_capacity(0);
                    fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::super::TezosContractID>(
                        "destination",
                        |m: &TezosManagerTransfer| { &m.destination },
                        |m: &mut TezosManagerTransfer| { &mut m.destination },
                    ));
                    fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                        "amount",
                        |m: &TezosManagerTransfer| { &m.amount },
                        |m: &mut TezosManagerTransfer| { &mut m.amount },
                    ));
                    ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosManagerTransfer>(
                        "TezosSignTx.TezosTransactionOp.TezosParametersManager.TezosManagerTransfer",
                        fields,
                        oneofs,
                    )
                }
            }

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

                fn is_initialized(&self) -> bool {
                    if self.destination.is_none() {
                        return false;
                    }
                    if self.amount.is_none() {
                        return false;
                    }
                    for v in &self.destination {
                        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.destination)?;
                            },
                            16 => {
                                self.amount = ::std::option::Option::Some(is.read_uint64()?);
                            },
                            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.destination.as_ref() {
                        let len = v.compute_size();
                        my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
                    }
                    if let Some(v) = self.amount {
                        my_size += ::protobuf::rt::uint64_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.destination.as_ref() {
                        ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
                    }
                    if let Some(v) = self.amount {
                        os.write_uint64(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() -> TezosManagerTransfer {
                    TezosManagerTransfer::new()
                }

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

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

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

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

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

    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosOriginationOp {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.source)
        pub source: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.fee)
        pub fee: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.counter)
        pub counter: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.gas_limit)
        pub gas_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.storage_limit)
        pub storage_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.manager_pubkey)
        pub manager_pubkey: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.balance)
        pub balance: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.spendable)
        pub spendable: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.delegatable)
        pub delegatable: ::std::option::Option<bool>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.delegate)
        pub delegate: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.script)
        pub script: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosOriginationOp.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes source = 12;

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

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

        pub fn has_source(&self) -> bool {
            self.source.is_some()
        }

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

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

        // required uint64 fee = 2;

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

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

        pub fn has_fee(&self) -> bool {
            self.fee.is_some()
        }

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

        // required uint64 counter = 3;

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

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

        pub fn has_counter(&self) -> bool {
            self.counter.is_some()
        }

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

        // required uint64 gas_limit = 4;

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

        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: u64) {
            self.gas_limit = ::std::option::Option::Some(v);
        }

        // required uint64 storage_limit = 5;

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

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

        pub fn has_storage_limit(&self) -> bool {
            self.storage_limit.is_some()
        }

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

        // optional bytes manager_pubkey = 6;

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

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

        pub fn has_manager_pubkey(&self) -> bool {
            self.manager_pubkey.is_some()
        }

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

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

        // required uint64 balance = 7;

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

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

        pub fn has_balance(&self) -> bool {
            self.balance.is_some()
        }

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

        // optional bool spendable = 8;

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

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

        pub fn has_spendable(&self) -> bool {
            self.spendable.is_some()
        }

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

        // optional bool delegatable = 9;

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

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

        pub fn has_delegatable(&self) -> bool {
            self.delegatable.is_some()
        }

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

        // optional bytes delegate = 10;

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

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

        pub fn has_delegate(&self) -> bool {
            self.delegate.is_some()
        }

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

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

        // required bytes script = 11;

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

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

        pub fn has_script(&self) -> bool {
            self.script.is_some()
        }

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(11);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "source",
                |m: &TezosOriginationOp| { &m.source },
                |m: &mut TezosOriginationOp| { &mut m.source },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "fee",
                |m: &TezosOriginationOp| { &m.fee },
                |m: &mut TezosOriginationOp| { &mut m.fee },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "counter",
                |m: &TezosOriginationOp| { &m.counter },
                |m: &mut TezosOriginationOp| { &mut m.counter },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "gas_limit",
                |m: &TezosOriginationOp| { &m.gas_limit },
                |m: &mut TezosOriginationOp| { &mut m.gas_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "storage_limit",
                |m: &TezosOriginationOp| { &m.storage_limit },
                |m: &mut TezosOriginationOp| { &mut m.storage_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "manager_pubkey",
                |m: &TezosOriginationOp| { &m.manager_pubkey },
                |m: &mut TezosOriginationOp| { &mut m.manager_pubkey },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "balance",
                |m: &TezosOriginationOp| { &m.balance },
                |m: &mut TezosOriginationOp| { &mut m.balance },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "spendable",
                |m: &TezosOriginationOp| { &m.spendable },
                |m: &mut TezosOriginationOp| { &mut m.spendable },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "delegatable",
                |m: &TezosOriginationOp| { &m.delegatable },
                |m: &mut TezosOriginationOp| { &mut m.delegatable },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "delegate",
                |m: &TezosOriginationOp| { &m.delegate },
                |m: &mut TezosOriginationOp| { &mut m.delegate },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "script",
                |m: &TezosOriginationOp| { &m.script },
                |m: &mut TezosOriginationOp| { &mut m.script },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosOriginationOp>(
                "TezosSignTx.TezosOriginationOp",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.source.is_none() {
                return false;
            }
            if self.fee.is_none() {
                return false;
            }
            if self.counter.is_none() {
                return false;
            }
            if self.gas_limit.is_none() {
                return false;
            }
            if self.storage_limit.is_none() {
                return false;
            }
            if self.balance.is_none() {
                return false;
            }
            if self.script.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 {
                    98 => {
                        self.source = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    16 => {
                        self.fee = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    24 => {
                        self.counter = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    32 => {
                        self.gas_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    40 => {
                        self.storage_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    50 => {
                        self.manager_pubkey = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    56 => {
                        self.balance = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    64 => {
                        self.spendable = ::std::option::Option::Some(is.read_bool()?);
                    },
                    72 => {
                        self.delegatable = ::std::option::Option::Some(is.read_bool()?);
                    },
                    82 => {
                        self.delegate = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    90 => {
                        self.script = ::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.source.as_ref() {
                my_size += ::protobuf::rt::bytes_size(12, &v);
            }
            if let Some(v) = self.fee {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            if let Some(v) = self.counter {
                my_size += ::protobuf::rt::uint64_size(3, v);
            }
            if let Some(v) = self.gas_limit {
                my_size += ::protobuf::rt::uint64_size(4, v);
            }
            if let Some(v) = self.storage_limit {
                my_size += ::protobuf::rt::uint64_size(5, v);
            }
            if let Some(v) = self.manager_pubkey.as_ref() {
                my_size += ::protobuf::rt::bytes_size(6, &v);
            }
            if let Some(v) = self.balance {
                my_size += ::protobuf::rt::uint64_size(7, v);
            }
            if let Some(v) = self.spendable {
                my_size += 1 + 1;
            }
            if let Some(v) = self.delegatable {
                my_size += 1 + 1;
            }
            if let Some(v) = self.delegate.as_ref() {
                my_size += ::protobuf::rt::bytes_size(10, &v);
            }
            if let Some(v) = self.script.as_ref() {
                my_size += ::protobuf::rt::bytes_size(11, &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.source.as_ref() {
                os.write_bytes(12, v)?;
            }
            if let Some(v) = self.fee {
                os.write_uint64(2, v)?;
            }
            if let Some(v) = self.counter {
                os.write_uint64(3, v)?;
            }
            if let Some(v) = self.gas_limit {
                os.write_uint64(4, v)?;
            }
            if let Some(v) = self.storage_limit {
                os.write_uint64(5, v)?;
            }
            if let Some(v) = self.manager_pubkey.as_ref() {
                os.write_bytes(6, v)?;
            }
            if let Some(v) = self.balance {
                os.write_uint64(7, v)?;
            }
            if let Some(v) = self.spendable {
                os.write_bool(8, v)?;
            }
            if let Some(v) = self.delegatable {
                os.write_bool(9, v)?;
            }
            if let Some(v) = self.delegate.as_ref() {
                os.write_bytes(10, v)?;
            }
            if let Some(v) = self.script.as_ref() {
                os.write_bytes(11, 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() -> TezosOriginationOp {
            TezosOriginationOp::new()
        }

        fn clear(&mut self) {
            self.source = ::std::option::Option::None;
            self.fee = ::std::option::Option::None;
            self.counter = ::std::option::Option::None;
            self.gas_limit = ::std::option::Option::None;
            self.storage_limit = ::std::option::Option::None;
            self.manager_pubkey = ::std::option::Option::None;
            self.balance = ::std::option::Option::None;
            self.spendable = ::std::option::Option::None;
            self.delegatable = ::std::option::Option::None;
            self.delegate = ::std::option::Option::None;
            self.script = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TezosOriginationOp {
            static instance: TezosOriginationOp = TezosOriginationOp {
                source: ::std::option::Option::None,
                fee: ::std::option::Option::None,
                counter: ::std::option::Option::None,
                gas_limit: ::std::option::Option::None,
                storage_limit: ::std::option::Option::None,
                manager_pubkey: ::std::option::Option::None,
                balance: ::std::option::Option::None,
                spendable: ::std::option::Option::None,
                delegatable: ::std::option::Option::None,
                delegate: ::std::option::Option::None,
                script: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosDelegationOp {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.source)
        pub source: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.fee)
        pub fee: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.counter)
        pub counter: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.gas_limit)
        pub gas_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.storage_limit)
        pub storage_limit: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.delegate)
        pub delegate: ::std::option::Option<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosDelegationOp.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes source = 7;

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

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

        pub fn has_source(&self) -> bool {
            self.source.is_some()
        }

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

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

        // required uint64 fee = 2;

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

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

        pub fn has_fee(&self) -> bool {
            self.fee.is_some()
        }

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

        // required uint64 counter = 3;

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

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

        pub fn has_counter(&self) -> bool {
            self.counter.is_some()
        }

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

        // required uint64 gas_limit = 4;

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

        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: u64) {
            self.gas_limit = ::std::option::Option::Some(v);
        }

        // required uint64 storage_limit = 5;

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

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

        pub fn has_storage_limit(&self) -> bool {
            self.storage_limit.is_some()
        }

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

        // required bytes delegate = 6;

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

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

        pub fn has_delegate(&self) -> bool {
            self.delegate.is_some()
        }

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(6);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "source",
                |m: &TezosDelegationOp| { &m.source },
                |m: &mut TezosDelegationOp| { &mut m.source },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "fee",
                |m: &TezosDelegationOp| { &m.fee },
                |m: &mut TezosDelegationOp| { &mut m.fee },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "counter",
                |m: &TezosDelegationOp| { &m.counter },
                |m: &mut TezosDelegationOp| { &mut m.counter },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "gas_limit",
                |m: &TezosDelegationOp| { &m.gas_limit },
                |m: &mut TezosDelegationOp| { &mut m.gas_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "storage_limit",
                |m: &TezosDelegationOp| { &m.storage_limit },
                |m: &mut TezosDelegationOp| { &mut m.storage_limit },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "delegate",
                |m: &TezosDelegationOp| { &m.delegate },
                |m: &mut TezosDelegationOp| { &mut m.delegate },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosDelegationOp>(
                "TezosSignTx.TezosDelegationOp",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.source.is_none() {
                return false;
            }
            if self.fee.is_none() {
                return false;
            }
            if self.counter.is_none() {
                return false;
            }
            if self.gas_limit.is_none() {
                return false;
            }
            if self.storage_limit.is_none() {
                return false;
            }
            if self.delegate.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 {
                    58 => {
                        self.source = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    16 => {
                        self.fee = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    24 => {
                        self.counter = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    32 => {
                        self.gas_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    40 => {
                        self.storage_limit = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    50 => {
                        self.delegate = ::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.source.as_ref() {
                my_size += ::protobuf::rt::bytes_size(7, &v);
            }
            if let Some(v) = self.fee {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            if let Some(v) = self.counter {
                my_size += ::protobuf::rt::uint64_size(3, v);
            }
            if let Some(v) = self.gas_limit {
                my_size += ::protobuf::rt::uint64_size(4, v);
            }
            if let Some(v) = self.storage_limit {
                my_size += ::protobuf::rt::uint64_size(5, v);
            }
            if let Some(v) = self.delegate.as_ref() {
                my_size += ::protobuf::rt::bytes_size(6, &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.source.as_ref() {
                os.write_bytes(7, v)?;
            }
            if let Some(v) = self.fee {
                os.write_uint64(2, v)?;
            }
            if let Some(v) = self.counter {
                os.write_uint64(3, v)?;
            }
            if let Some(v) = self.gas_limit {
                os.write_uint64(4, v)?;
            }
            if let Some(v) = self.storage_limit {
                os.write_uint64(5, v)?;
            }
            if let Some(v) = self.delegate.as_ref() {
                os.write_bytes(6, 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() -> TezosDelegationOp {
            TezosDelegationOp::new()
        }

        fn clear(&mut self) {
            self.source = ::std::option::Option::None;
            self.fee = ::std::option::Option::None;
            self.counter = ::std::option::Option::None;
            self.gas_limit = ::std::option::Option::None;
            self.storage_limit = ::std::option::Option::None;
            self.delegate = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TezosDelegationOp {
            static instance: TezosDelegationOp = TezosDelegationOp {
                source: ::std::option::Option::None,
                fee: ::std::option::Option::None,
                counter: ::std::option::Option::None,
                gas_limit: ::std::option::Option::None,
                storage_limit: ::std::option::Option::None,
                delegate: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosProposalOp)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosProposalOp {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosProposalOp.source)
        pub source: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosProposalOp.period)
        pub period: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosProposalOp.proposals)
        pub proposals: ::std::vec::Vec<::std::vec::Vec<u8>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosProposalOp.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes source = 1;

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

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

        pub fn has_source(&self) -> bool {
            self.source.is_some()
        }

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

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

        // required uint64 period = 2;

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

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

        pub fn has_period(&self) -> bool {
            self.period.is_some()
        }

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

        pub(in super) 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::<_, _>(
                "source",
                |m: &TezosProposalOp| { &m.source },
                |m: &mut TezosProposalOp| { &mut m.source },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "period",
                |m: &TezosProposalOp| { &m.period },
                |m: &mut TezosProposalOp| { &mut m.period },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
                "proposals",
                |m: &TezosProposalOp| { &m.proposals },
                |m: &mut TezosProposalOp| { &mut m.proposals },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosProposalOp>(
                "TezosSignTx.TezosProposalOp",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.source.is_none() {
                return false;
            }
            if self.period.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.source = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    16 => {
                        self.period = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    34 => {
                        self.proposals.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.source.as_ref() {
                my_size += ::protobuf::rt::bytes_size(1, &v);
            }
            if let Some(v) = self.period {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            for value in &self.proposals {
                my_size += ::protobuf::rt::bytes_size(4, &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.source.as_ref() {
                os.write_bytes(1, v)?;
            }
            if let Some(v) = self.period {
                os.write_uint64(2, v)?;
            }
            for v in &self.proposals {
                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() -> TezosProposalOp {
            TezosProposalOp::new()
        }

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

        fn default_instance() -> &'static TezosProposalOp {
            static instance: TezosProposalOp = TezosProposalOp {
                source: ::std::option::Option::None,
                period: ::std::option::Option::None,
                proposals: ::std::vec::Vec::new(),
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    // @@protoc_insertion_point(message:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct TezosBallotOp {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.source)
        pub source: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.period)
        pub period: ::std::option::Option<u64>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.proposal)
        pub proposal: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.ballot)
        pub ballot: ::std::option::Option<::protobuf::EnumOrUnknown<tezos_ballot_op::TezosBallotType>>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes source = 1;

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

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

        pub fn has_source(&self) -> bool {
            self.source.is_some()
        }

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

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

        // required uint64 period = 2;

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

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

        pub fn has_period(&self) -> bool {
            self.period.is_some()
        }

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

        // required bytes proposal = 3;

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

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

        pub fn has_proposal(&self) -> bool {
            self.proposal.is_some()
        }

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

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

        // required .hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.TezosBallotType ballot = 4;

        pub fn ballot(&self) -> tezos_ballot_op::TezosBallotType {
            match self.ballot {
                Some(e) => e.enum_value_or(tezos_ballot_op::TezosBallotType::Yay),
                None => tezos_ballot_op::TezosBallotType::Yay,
            }
        }

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

        pub fn has_ballot(&self) -> bool {
            self.ballot.is_some()
        }

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(4);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "source",
                |m: &TezosBallotOp| { &m.source },
                |m: &mut TezosBallotOp| { &mut m.source },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "period",
                |m: &TezosBallotOp| { &m.period },
                |m: &mut TezosBallotOp| { &mut m.period },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "proposal",
                |m: &TezosBallotOp| { &m.proposal },
                |m: &mut TezosBallotOp| { &mut m.proposal },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "ballot",
                |m: &TezosBallotOp| { &m.ballot },
                |m: &mut TezosBallotOp| { &mut m.ballot },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosBallotOp>(
                "TezosSignTx.TezosBallotOp",
                fields,
                oneofs,
            )
        }
    }

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

        fn is_initialized(&self) -> bool {
            if self.source.is_none() {
                return false;
            }
            if self.period.is_none() {
                return false;
            }
            if self.proposal.is_none() {
                return false;
            }
            if self.ballot.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.source = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    16 => {
                        self.period = ::std::option::Option::Some(is.read_uint64()?);
                    },
                    26 => {
                        self.proposal = ::std::option::Option::Some(is.read_bytes()?);
                    },
                    32 => {
                        self.ballot = ::std::option::Option::Some(is.read_enum_or_unknown()?);
                    },
                    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.source.as_ref() {
                my_size += ::protobuf::rt::bytes_size(1, &v);
            }
            if let Some(v) = self.period {
                my_size += ::protobuf::rt::uint64_size(2, v);
            }
            if let Some(v) = self.proposal.as_ref() {
                my_size += ::protobuf::rt::bytes_size(3, &v);
            }
            if let Some(v) = self.ballot {
                my_size += ::protobuf::rt::int32_size(4, v.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.source.as_ref() {
                os.write_bytes(1, v)?;
            }
            if let Some(v) = self.period {
                os.write_uint64(2, v)?;
            }
            if let Some(v) = self.proposal.as_ref() {
                os.write_bytes(3, v)?;
            }
            if let Some(v) = self.ballot {
                os.write_enum(4, ::protobuf::EnumOrUnknown::value(&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() -> TezosBallotOp {
            TezosBallotOp::new()
        }

        fn clear(&mut self) {
            self.source = ::std::option::Option::None;
            self.period = ::std::option::Option::None;
            self.proposal = ::std::option::Option::None;
            self.ballot = ::std::option::Option::None;
            self.special_fields.clear();
        }

        fn default_instance() -> &'static TezosBallotOp {
            static instance: TezosBallotOp = TezosBallotOp {
                source: ::std::option::Option::None,
                period: ::std::option::Option::None,
                proposal: ::std::option::Option::None,
                ballot: ::std::option::Option::None,
                special_fields: ::protobuf::SpecialFields::new(),
            };
            &instance
        }
    }

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

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

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

    /// Nested message and enums of message `TezosBallotOp`
    pub mod tezos_ballot_op {
        #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
        // @@protoc_insertion_point(enum:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.TezosBallotType)
        pub enum TezosBallotType {
            // @@protoc_insertion_point(enum_value:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.TezosBallotType.Yay)
            Yay = 0,
            // @@protoc_insertion_point(enum_value:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.TezosBallotType.Nay)
            Nay = 1,
            // @@protoc_insertion_point(enum_value:hw.trezor.messages.tezos.TezosSignTx.TezosBallotOp.TezosBallotType.Pass)
            Pass = 2,
        }

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

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

            fn from_i32(value: i32) -> ::std::option::Option<TezosBallotType> {
                match value {
                    0 => ::std::option::Option::Some(TezosBallotType::Yay),
                    1 => ::std::option::Option::Some(TezosBallotType::Nay),
                    2 => ::std::option::Option::Some(TezosBallotType::Pass),
                    _ => ::std::option::Option::None
                }
            }

            fn from_str(str: &str) -> ::std::option::Option<TezosBallotType> {
                match str {
                    "Yay" => ::std::option::Option::Some(TezosBallotType::Yay),
                    "Nay" => ::std::option::Option::Some(TezosBallotType::Nay),
                    "Pass" => ::std::option::Option::Some(TezosBallotType::Pass),
                    _ => ::std::option::Option::None
                }
            }

            const VALUES: &'static [TezosBallotType] = &[
                TezosBallotType::Yay,
                TezosBallotType::Nay,
                TezosBallotType::Pass,
            ];
        }

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

            fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
                let index = *self as usize;
                Self::enum_descriptor().value_by_index(index)
            }
        }

        impl ::std::default::Default for TezosBallotType {
            fn default() -> Self {
                TezosBallotType::Yay
            }
        }

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

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

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

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

    // required string signature = 1;

    pub fn signature(&self) -> &str {
        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::string::String) {
        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::string::String {
        if self.signature.is_none() {
            self.signature = ::std::option::Option::Some(::std::string::String::new());
        }
        self.signature.as_mut().unwrap()
    }

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

    // required bytes sig_op_contents = 2;

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

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

    pub fn has_sig_op_contents(&self) -> bool {
        self.sig_op_contents.is_some()
    }

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

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

    // required string operation_hash = 3;

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

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

    pub fn has_operation_hash(&self) -> bool {
        self.operation_hash.is_some()
    }

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

    // Take field
    pub fn take_operation_hash(&mut self) -> ::std::string::String {
        self.operation_hash.take().unwrap_or_else(|| ::std::string::String::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::<_, _>(
            "signature",
            |m: &TezosSignedTx| { &m.signature },
            |m: &mut TezosSignedTx| { &mut m.signature },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "sig_op_contents",
            |m: &TezosSignedTx| { &m.sig_op_contents },
            |m: &mut TezosSignedTx| { &mut m.sig_op_contents },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "operation_hash",
            |m: &TezosSignedTx| { &m.operation_hash },
            |m: &mut TezosSignedTx| { &mut m.operation_hash },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TezosSignedTx>(
            "TezosSignedTx",
            fields,
            oneofs,
        )
    }
}

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

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

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

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

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x14messages-tezos.proto\x12\x18hw.trezor.messages.tezos\"m\n\x0fTezos\
    GetAddress\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\
    \x0cshow_display\x18\x02\x20\x01(\x08R\x0bshowDisplay\x12\x1a\n\x08chunk\
    ify\x18\x03\x20\x01(\x08R\x08chunkify\"(\n\x0cTezosAddress\x12\x18\n\x07\
    address\x18\x01\x20\x02(\tR\x07address\"o\n\x11TezosGetPublicKey\x12\x1b\
    \n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12!\n\x0cshow_display\x18\
    \x02\x20\x01(\x08R\x0bshowDisplay\x12\x1a\n\x08chunkify\x18\x03\x20\x01(\
    \x08R\x08chunkify\"/\n\x0eTezosPublicKey\x12\x1d\n\npublic_key\x18\x01\
    \x20\x02(\tR\tpublicKey\"\xc0\x14\n\x0bTezosSignTx\x12\x1b\n\taddress_n\
    \x18\x01\x20\x03(\rR\x08addressN\x12\x16\n\x06branch\x18\x02\x20\x02(\
    \x0cR\x06branch\x12K\n\x06reveal\x18\x03\x20\x01(\x0b23.hw.trezor.messag\
    es.tezos.TezosSignTx.TezosRevealOpR\x06reveal\x12Z\n\x0btransaction\x18\
    \x04\x20\x01(\x0b28.hw.trezor.messages.tezos.TezosSignTx.TezosTransactio\
    nOpR\x0btransaction\x12Z\n\x0borigination\x18\x05\x20\x01(\x0b28.hw.trez\
    or.messages.tezos.TezosSignTx.TezosOriginationOpR\x0borigination\x12W\n\
    \ndelegation\x18\x06\x20\x01(\x0b27.hw.trezor.messages.tezos.TezosSignTx\
    .TezosDelegationOpR\ndelegation\x12Q\n\x08proposal\x18\x07\x20\x01(\x0b2\
    5.hw.trezor.messages.tezos.TezosSignTx.TezosProposalOpR\x08proposal\x12K\
    \n\x06ballot\x18\x08\x20\x01(\x0b23.hw.trezor.messages.tezos.TezosSignTx\
    .TezosBallotOpR\x06ballot\x12\x1a\n\x08chunkify\x18\t\x20\x01(\x08R\x08c\
    hunkify\x1a\xb3\x01\n\x0fTezosContractID\x12Y\n\x03tag\x18\x01\x20\x02(\
    \x0e2G.hw.trezor.messages.tezos.TezosSignTx.TezosContractID.TezosContrac\
    tTypeR\x03tag\x12\x12\n\x04hash\x18\x02\x20\x02(\x0cR\x04hash\"1\n\x11Te\
    zosContractType\x12\x0c\n\x08Implicit\x10\0\x12\x0e\n\nOriginated\x10\
    \x01\x1a\xb4\x01\n\rTezosRevealOp\x12\x16\n\x06source\x18\x07\x20\x02(\
    \x0cR\x06source\x12\x10\n\x03fee\x18\x02\x20\x02(\x04R\x03fee\x12\x18\n\
    \x07counter\x18\x03\x20\x02(\x04R\x07counter\x12\x1b\n\tgas_limit\x18\
    \x04\x20\x02(\x04R\x08gasLimit\x12#\n\rstorage_limit\x18\x05\x20\x02(\
    \x04R\x0cstorageLimit\x12\x1d\n\npublic_key\x18\x06\x20\x02(\x0cR\tpubli\
    cKey\x1a\x9f\x06\n\x12TezosTransactionOp\x12\x16\n\x06source\x18\t\x20\
    \x02(\x0cR\x06source\x12\x10\n\x03fee\x18\x02\x20\x02(\x04R\x03fee\x12\
    \x18\n\x07counter\x18\x03\x20\x02(\x04R\x07counter\x12\x1b\n\tgas_limit\
    \x18\x04\x20\x02(\x04R\x08gasLimit\x12#\n\rstorage_limit\x18\x05\x20\x02\
    (\x04R\x0cstorageLimit\x12\x16\n\x06amount\x18\x06\x20\x02(\x04R\x06amou\
    nt\x12W\n\x0bdestination\x18\x07\x20\x02(\x0b25.hw.trezor.messages.tezos\
    .TezosSignTx.TezosContractIDR\x0bdestination\x12\x1e\n\nparameters\x18\
    \x08\x20\x01(\x0cR\nparameters\x12~\n\x12parameters_manager\x18\n\x20\
    \x01(\x0b2O.hw.trezor.messages.tezos.TezosSignTx.TezosTransactionOp.Tezo\
    sParametersManagerR\x11parametersManager\x1a\xf1\x02\n\x16TezosParameter\
    sManager\x12!\n\x0cset_delegate\x18\x01\x20\x01(\x0cR\x0bsetDelegate\x12\
    '\n\x0fcancel_delegate\x18\x02\x20\x01(\x08R\x0ecancelDelegate\x12\x80\
    \x01\n\x08transfer\x18\x03\x20\x01(\x0b2d.hw.trezor.messages.tezos.Tezos\
    SignTx.TezosTransactionOp.TezosParametersManager.TezosManagerTransferR\
    \x08transfer\x1a\x87\x01\n\x14TezosManagerTransfer\x12W\n\x0bdestination\
    \x18\x01\x20\x02(\x0b25.hw.trezor.messages.tezos.TezosSignTx.TezosContra\
    ctIDR\x0bdestination\x12\x16\n\x06amount\x18\x02\x20\x02(\x04R\x06amount\
    \x1a\xcf\x02\n\x12TezosOriginationOp\x12\x16\n\x06source\x18\x0c\x20\x02\
    (\x0cR\x06source\x12\x10\n\x03fee\x18\x02\x20\x02(\x04R\x03fee\x12\x18\n\
    \x07counter\x18\x03\x20\x02(\x04R\x07counter\x12\x1b\n\tgas_limit\x18\
    \x04\x20\x02(\x04R\x08gasLimit\x12#\n\rstorage_limit\x18\x05\x20\x02(\
    \x04R\x0cstorageLimit\x12%\n\x0emanager_pubkey\x18\x06\x20\x01(\x0cR\rma\
    nagerPubkey\x12\x18\n\x07balance\x18\x07\x20\x02(\x04R\x07balance\x12\
    \x1c\n\tspendable\x18\x08\x20\x01(\x08R\tspendable\x12\x20\n\x0bdelegata\
    ble\x18\t\x20\x01(\x08R\x0bdelegatable\x12\x1a\n\x08delegate\x18\n\x20\
    \x01(\x0cR\x08delegate\x12\x16\n\x06script\x18\x0b\x20\x02(\x0cR\x06scri\
    pt\x1a\xb5\x01\n\x11TezosDelegationOp\x12\x16\n\x06source\x18\x07\x20\
    \x02(\x0cR\x06source\x12\x10\n\x03fee\x18\x02\x20\x02(\x04R\x03fee\x12\
    \x18\n\x07counter\x18\x03\x20\x02(\x04R\x07counter\x12\x1b\n\tgas_limit\
    \x18\x04\x20\x02(\x04R\x08gasLimit\x12#\n\rstorage_limit\x18\x05\x20\x02\
    (\x04R\x0cstorageLimit\x12\x1a\n\x08delegate\x18\x06\x20\x02(\x0cR\x08de\
    legate\x1a_\n\x0fTezosProposalOp\x12\x16\n\x06source\x18\x01\x20\x02(\
    \x0cR\x06source\x12\x16\n\x06period\x18\x02\x20\x02(\x04R\x06period\x12\
    \x1c\n\tproposals\x18\x04\x20\x03(\x0cR\tproposals\x1a\xe7\x01\n\rTezosB\
    allotOp\x12\x16\n\x06source\x18\x01\x20\x02(\x0cR\x06source\x12\x16\n\
    \x06period\x18\x02\x20\x02(\x04R\x06period\x12\x1a\n\x08proposal\x18\x03\
    \x20\x02(\x0cR\x08proposal\x12[\n\x06ballot\x18\x04\x20\x02(\x0e2C.hw.tr\
    ezor.messages.tezos.TezosSignTx.TezosBallotOp.TezosBallotTypeR\x06ballot\
    \"-\n\x0fTezosBallotType\x12\x07\n\x03Yay\x10\0\x12\x07\n\x03Nay\x10\x01\
    \x12\x08\n\x04Pass\x10\x02\"|\n\rTezosSignedTx\x12\x1c\n\tsignature\x18\
    \x01\x20\x02(\tR\tsignature\x12&\n\x0fsig_op_contents\x18\x02\x20\x02(\
    \x0cR\rsigOpContents\x12%\n\x0eoperation_hash\x18\x03\x20\x02(\tR\ropera\
    tionHashB9\n#com.satoshilabs.trezor.lib.protobufB\x12TrezorMessageTezos\
";

/// `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(0);
            let mut messages = ::std::vec::Vec::with_capacity(15);
            messages.push(TezosGetAddress::generated_message_descriptor_data());
            messages.push(TezosAddress::generated_message_descriptor_data());
            messages.push(TezosGetPublicKey::generated_message_descriptor_data());
            messages.push(TezosPublicKey::generated_message_descriptor_data());
            messages.push(TezosSignTx::generated_message_descriptor_data());
            messages.push(TezosSignedTx::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosContractID::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosRevealOp::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosTransactionOp::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosOriginationOp::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosDelegationOp::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosProposalOp::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::TezosBallotOp::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::tezos_transaction_op::TezosParametersManager::generated_message_descriptor_data());
            messages.push(tezos_sign_tx::tezos_transaction_op::tezos_parameters_manager::TezosManagerTransfer::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(2);
            enums.push(tezos_sign_tx::tezos_contract_id::TezosContractType::generated_enum_descriptor_data());
            enums.push(tezos_sign_tx::tezos_ballot_op::TezosBallotType::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
