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

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

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

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

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

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

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

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

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

    // optional bool show_display = 2;

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

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

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

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

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

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

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

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

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.show_display {
            os.write_bool(2, v)?;
        }
        os.write_unknown_fields(self.special_fields.unknown_fields())?;
        ::std::result::Result::Ok(())
    }

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

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

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

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

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

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

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

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

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

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

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

    // required bytes public_key = 1;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

impl SolanaGetAddress {
    pub fn new() -> SolanaGetAddress {
        ::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: &SolanaGetAddress| { &m.address_n },
            |m: &mut SolanaGetAddress| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "show_display",
            |m: &SolanaGetAddress| { &m.show_display },
            |m: &mut SolanaGetAddress| { &mut m.show_display },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "chunkify",
            |m: &SolanaGetAddress| { &m.chunkify },
            |m: &mut SolanaGetAddress| { &mut m.chunkify },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SolanaGetAddress>(
            "SolanaGetAddress",
            fields,
            oneofs,
        )
    }
}

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

    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() -> SolanaGetAddress {
        SolanaGetAddress::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 SolanaGetAddress {
        static instance: SolanaGetAddress = SolanaGetAddress {
            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 SolanaGetAddress {
    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("SolanaGetAddress").unwrap()).clone()
    }
}

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

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

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

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

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

    // optional bytes mac = 2;

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

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

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

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

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

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

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

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

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

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

    // Compute sizes of nested messages
    #[allow(unused_variables)]
    fn compute_size(&self) -> u64 {
        let mut my_size = 0;
        if let Some(v) = self.address.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.mac.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.address.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.mac.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() -> SolanaAddress {
        SolanaAddress::new()
    }

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

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

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

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

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

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

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

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

    // required string base_address = 1;

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

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

    pub fn has_base_address(&self) -> bool {
        self.base_address.is_some()
    }

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

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

    // required string token_program = 2;

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

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

    pub fn has_token_program(&self) -> bool {
        self.token_program.is_some()
    }

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

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

    // required string token_mint = 3;

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

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

    pub fn has_token_mint(&self) -> bool {
        self.token_mint.is_some()
    }

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

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

    // required string token_account = 4;

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

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

    pub fn has_token_account(&self) -> bool {
        self.token_account.is_some()
    }

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

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

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

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

    fn is_initialized(&self) -> bool {
        if self.base_address.is_none() {
            return false;
        }
        if self.token_program.is_none() {
            return false;
        }
        if self.token_mint.is_none() {
            return false;
        }
        if self.token_account.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.base_address = ::std::option::Option::Some(is.read_string()?);
                },
                18 => {
                    self.token_program = ::std::option::Option::Some(is.read_string()?);
                },
                26 => {
                    self.token_mint = ::std::option::Option::Some(is.read_string()?);
                },
                34 => {
                    self.token_account = ::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.base_address.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.token_program.as_ref() {
            my_size += ::protobuf::rt::string_size(2, &v);
        }
        if let Some(v) = self.token_mint.as_ref() {
            my_size += ::protobuf::rt::string_size(3, &v);
        }
        if let Some(v) = self.token_account.as_ref() {
            my_size += ::protobuf::rt::string_size(4, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

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

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

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

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

    fn clear(&mut self) {
        self.base_address = ::std::option::Option::None;
        self.token_program = ::std::option::Option::None;
        self.token_mint = ::std::option::Option::None;
        self.token_account = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static SolanaTxTokenAccountInfo {
        static instance: SolanaTxTokenAccountInfo = SolanaTxTokenAccountInfo {
            base_address: ::std::option::Option::None,
            token_program: ::std::option::Option::None,
            token_mint: ::std::option::Option::None,
            token_account: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

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

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

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

    // optional bytes encoded_token = 2;

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

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

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

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

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

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

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

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

    fn is_initialized(&self) -> bool {
        for v in &self.token_accounts_infos {
            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.token_accounts_infos.push(is.read_message()?);
                },
                18 => {
                    self.encoded_token = ::std::option::Option::Some(is.read_bytes()?);
                },
                tag => {
                    ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
                },
            };
        }
        ::std::result::Result::Ok(())
    }

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

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

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

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

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

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.solana.SolanaSignTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct SolanaSignTx {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.solana.SolanaSignTx.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.solana.SolanaSignTx.serialized_tx)
    pub serialized_tx: ::std::option::Option<::std::vec::Vec<u8>>,
    // @@protoc_insertion_point(field:hw.trezor.messages.solana.SolanaSignTx.additional_info)
    pub additional_info: ::protobuf::MessageField<SolanaTxAdditionalInfo>,
    // @@protoc_insertion_point(field:hw.trezor.messages.solana.SolanaSignTx.payment_req)
    pub payment_req: ::protobuf::MessageField<super::messages_common::PaymentRequest>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.solana.SolanaSignTx.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required bytes serialized_tx = 2;

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

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

    pub fn has_serialized_tx(&self) -> bool {
        self.serialized_tx.is_some()
    }

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(4);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "address_n",
            |m: &SolanaSignTx| { &m.address_n },
            |m: &mut SolanaSignTx| { &mut m.address_n },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "serialized_tx",
            |m: &SolanaSignTx| { &m.serialized_tx },
            |m: &mut SolanaSignTx| { &mut m.serialized_tx },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, SolanaTxAdditionalInfo>(
            "additional_info",
            |m: &SolanaSignTx| { &m.additional_info },
            |m: &mut SolanaSignTx| { &mut m.additional_info },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, super::messages_common::PaymentRequest>(
            "payment_req",
            |m: &SolanaSignTx| { &m.payment_req },
            |m: &mut SolanaSignTx| { &mut m.payment_req },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<SolanaSignTx>(
            "SolanaSignTx",
            fields,
            oneofs,
        )
    }
}

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

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

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

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        if let Some(v) = self.serialized_tx.as_ref() {
            os.write_bytes(2, v)?;
        }
        if let Some(v) = self.additional_info.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
        }
        if let Some(v) = self.payment_req.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(4, 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() -> SolanaSignTx {
        SolanaSignTx::new()
    }

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

    fn default_instance() -> &'static SolanaSignTx {
        static instance: SolanaSignTx = SolanaSignTx {
            address_n: ::std::vec::Vec::new(),
            serialized_tx: ::std::option::Option::None,
            additional_info: ::protobuf::MessageField::none(),
            payment_req: ::protobuf::MessageField::none(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

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

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

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

    // required bytes signature = 1;

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

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

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

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

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

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

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

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

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

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

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.signature.as_ref() {
            os.write_bytes(1, v)?;
        }
        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() -> SolanaTxSignature {
        SolanaTxSignature::new()
    }

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

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

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x15messages-solana.proto\x12\x19hw.trezor.messages.solana\x1a\x15mess\
    ages-common.proto\"T\n\x12SolanaGetPublicKey\x12\x1b\n\taddress_n\x18\
    \x01\x20\x03(\rR\x08addressN\x12!\n\x0cshow_display\x18\x02\x20\x01(\x08\
    R\x0bshowDisplay\"0\n\x0fSolanaPublicKey\x12\x1d\n\npublic_key\x18\x01\
    \x20\x02(\x0cR\tpublicKey\"n\n\x10SolanaGetAddress\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\x08chun\
    kify\";\n\rSolanaAddress\x12\x18\n\x07address\x18\x01\x20\x02(\tR\x07add\
    ress\x12\x10\n\x03mac\x18\x02\x20\x01(\x0cR\x03mac\"\xa6\x01\n\x18Solana\
    TxTokenAccountInfo\x12!\n\x0cbase_address\x18\x01\x20\x02(\tR\x0bbaseAdd\
    ress\x12#\n\rtoken_program\x18\x02\x20\x02(\tR\x0ctokenProgram\x12\x1d\n\
    \ntoken_mint\x18\x03\x20\x02(\tR\ttokenMint\x12#\n\rtoken_account\x18\
    \x04\x20\x02(\tR\x0ctokenAccount\"\xa4\x01\n\x16SolanaTxAdditionalInfo\
    \x12e\n\x14token_accounts_infos\x18\x01\x20\x03(\x0b23.hw.trezor.message\
    s.solana.SolanaTxTokenAccountInfoR\x12tokenAccountsInfos\x12#\n\rencoded\
    _token\x18\x02\x20\x01(\x0cR\x0cencodedToken\"\xf8\x01\n\x0cSolanaSignTx\
    \x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12#\n\rserialized\
    _tx\x18\x02\x20\x02(\x0cR\x0cserializedTx\x12Z\n\x0fadditional_info\x18\
    \x03\x20\x01(\x0b21.hw.trezor.messages.solana.SolanaTxAdditionalInfoR\
    \x0eadditionalInfo\x12J\n\x0bpayment_req\x18\x04\x20\x01(\x0b2).hw.trezo\
    r.messages.common.PaymentRequestR\npaymentReq\"1\n\x11SolanaTxSignature\
    \x12\x1c\n\tsignature\x18\x01\x20\x02(\x0cR\tsignature\
";

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

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(1);
            deps.push(super::messages_common::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(8);
            messages.push(SolanaGetPublicKey::generated_message_descriptor_data());
            messages.push(SolanaPublicKey::generated_message_descriptor_data());
            messages.push(SolanaGetAddress::generated_message_descriptor_data());
            messages.push(SolanaAddress::generated_message_descriptor_data());
            messages.push(SolanaTxTokenAccountInfo::generated_message_descriptor_data());
            messages.push(SolanaTxAdditionalInfo::generated_message_descriptor_data());
            messages.push(SolanaSignTx::generated_message_descriptor_data());
            messages.push(SolanaTxSignature::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(0);
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
