// 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-thp.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.thp.ThpDeviceProperties)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ThpDeviceProperties {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.internal_model)
    pub internal_model: ::std::option::Option<::std::string::String>,
    // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.model_variant)
    pub model_variant: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.protocol_version_major)
    pub protocol_version_major: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.protocol_version_minor)
    pub protocol_version_minor: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpDeviceProperties.pairing_methods)
    pub pairing_methods: ::std::vec::Vec<::protobuf::EnumOrUnknown<ThpPairingMethod>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpDeviceProperties.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required string internal_model = 1;

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

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

    pub fn has_internal_model(&self) -> bool {
        self.internal_model.is_some()
    }

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

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

    // optional uint32 model_variant = 2;

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

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

    pub fn has_model_variant(&self) -> bool {
        self.model_variant.is_some()
    }

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

    // required uint32 protocol_version_major = 3;

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

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

    pub fn has_protocol_version_major(&self) -> bool {
        self.protocol_version_major.is_some()
    }

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

    // required uint32 protocol_version_minor = 4;

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

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

    pub fn has_protocol_version_minor(&self) -> bool {
        self.protocol_version_minor.is_some()
    }

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(5);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "internal_model",
            |m: &ThpDeviceProperties| { &m.internal_model },
            |m: &mut ThpDeviceProperties| { &mut m.internal_model },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "model_variant",
            |m: &ThpDeviceProperties| { &m.model_variant },
            |m: &mut ThpDeviceProperties| { &mut m.model_variant },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "protocol_version_major",
            |m: &ThpDeviceProperties| { &m.protocol_version_major },
            |m: &mut ThpDeviceProperties| { &mut m.protocol_version_major },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "protocol_version_minor",
            |m: &ThpDeviceProperties| { &m.protocol_version_minor },
            |m: &mut ThpDeviceProperties| { &mut m.protocol_version_minor },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "pairing_methods",
            |m: &ThpDeviceProperties| { &m.pairing_methods },
            |m: &mut ThpDeviceProperties| { &mut m.pairing_methods },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpDeviceProperties>(
            "ThpDeviceProperties",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.internal_model.is_none() {
            return false;
        }
        if self.protocol_version_major.is_none() {
            return false;
        }
        if self.protocol_version_minor.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.internal_model = ::std::option::Option::Some(is.read_string()?);
                },
                16 => {
                    self.model_variant = ::std::option::Option::Some(is.read_uint32()?);
                },
                24 => {
                    self.protocol_version_major = ::std::option::Option::Some(is.read_uint32()?);
                },
                32 => {
                    self.protocol_version_minor = ::std::option::Option::Some(is.read_uint32()?);
                },
                40 => {
                    self.pairing_methods.push(is.read_enum_or_unknown()?);
                },
                42 => {
                    ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.pairing_methods)?
                },
                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.internal_model.as_ref() {
            my_size += ::protobuf::rt::string_size(1, &v);
        }
        if let Some(v) = self.model_variant {
            my_size += ::protobuf::rt::uint32_size(2, v);
        }
        if let Some(v) = self.protocol_version_major {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        if let Some(v) = self.protocol_version_minor {
            my_size += ::protobuf::rt::uint32_size(4, v);
        }
        for value in &self.pairing_methods {
            my_size += ::protobuf::rt::int32_size(5, value.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.internal_model.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.model_variant {
            os.write_uint32(2, v)?;
        }
        if let Some(v) = self.protocol_version_major {
            os.write_uint32(3, v)?;
        }
        if let Some(v) = self.protocol_version_minor {
            os.write_uint32(4, v)?;
        }
        for v in &self.pairing_methods {
            os.write_enum(5, ::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() -> ThpDeviceProperties {
        ThpDeviceProperties::new()
    }

    fn clear(&mut self) {
        self.internal_model = ::std::option::Option::None;
        self.model_variant = ::std::option::Option::None;
        self.protocol_version_major = ::std::option::Option::None;
        self.protocol_version_minor = ::std::option::Option::None;
        self.pairing_methods.clear();
        self.special_fields.clear();
    }

    fn default_instance() -> &'static ThpDeviceProperties {
        static instance: ThpDeviceProperties = ThpDeviceProperties {
            internal_model: ::std::option::Option::None,
            model_variant: ::std::option::Option::None,
            protocol_version_major: ::std::option::Option::None,
            protocol_version_minor: ::std::option::Option::None,
            pairing_methods: ::std::vec::Vec::new(),
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

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

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

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

    // optional bytes host_pairing_credential = 1;

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

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

    pub fn has_host_pairing_credential(&self) -> bool {
        self.host_pairing_credential.is_some()
    }

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

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

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

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

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    self.host_pairing_credential = ::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.host_pairing_credential.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.host_pairing_credential.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() -> ThpHandshakeCompletionReqNoisePayload {
        ThpHandshakeCompletionReqNoisePayload::new()
    }

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

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

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

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

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

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

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

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

    // optional string passphrase = 1;

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

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

    pub fn has_passphrase(&self) -> bool {
        self.passphrase.is_some()
    }

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

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

    // optional bool on_device = 2;

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

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

    pub fn has_on_device(&self) -> bool {
        self.on_device.is_some()
    }

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

    // optional bool derive_cardano = 3;

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

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

    pub fn has_derive_cardano(&self) -> bool {
        self.derive_cardano.is_some()
    }

    // Param is passed by value, moved
    pub fn set_derive_cardano(&mut self, v: bool) {
        self.derive_cardano = ::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_option_accessor::<_, _>(
            "passphrase",
            |m: &ThpCreateNewSession| { &m.passphrase },
            |m: &mut ThpCreateNewSession| { &mut m.passphrase },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "on_device",
            |m: &ThpCreateNewSession| { &m.on_device },
            |m: &mut ThpCreateNewSession| { &mut m.on_device },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "derive_cardano",
            |m: &ThpCreateNewSession| { &m.derive_cardano },
            |m: &mut ThpCreateNewSession| { &mut m.derive_cardano },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpCreateNewSession>(
            "ThpCreateNewSession",
            fields,
            oneofs,
        )
    }
}

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

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

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

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        if let Some(v) = self.passphrase.as_ref() {
            os.write_string(1, v)?;
        }
        if let Some(v) = self.on_device {
            os.write_bool(2, v)?;
        }
        if let Some(v) = self.derive_cardano {
            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() -> ThpCreateNewSession {
        ThpCreateNewSession::new()
    }

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

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

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

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

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

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

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

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

    // required string host_name = 1;

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

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

    pub fn has_host_name(&self) -> bool {
        self.host_name.is_some()
    }

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

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

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

    // required string app_name = 2;

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

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

    pub fn has_app_name(&self) -> bool {
        self.app_name.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpPairingRequestApproved)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ThpPairingRequestApproved {
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpPairingRequestApproved.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(0);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpPairingRequestApproved>(
            "ThpPairingRequestApproved",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                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;
        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<()> {
        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() -> ThpPairingRequestApproved {
        ThpPairingRequestApproved::new()
    }

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

    fn default_instance() -> &'static ThpPairingRequestApproved {
        static instance: ThpPairingRequestApproved = ThpPairingRequestApproved {
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpSelectMethod)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ThpSelectMethod {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpSelectMethod.selected_pairing_method)
    pub selected_pairing_method: ::std::option::Option<::protobuf::EnumOrUnknown<ThpPairingMethod>>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpSelectMethod.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required .hw.trezor.messages.thp.ThpPairingMethod selected_pairing_method = 1;

    pub fn selected_pairing_method(&self) -> ThpPairingMethod {
        match self.selected_pairing_method {
            Some(e) => e.enum_value_or(ThpPairingMethod::SkipPairing),
            None => ThpPairingMethod::SkipPairing,
        }
    }

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

    pub fn has_selected_pairing_method(&self) -> bool {
        self.selected_pairing_method.is_some()
    }

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

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

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

    fn is_initialized(&self) -> bool {
        if self.selected_pairing_method.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.selected_pairing_method = ::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.selected_pairing_method {
            my_size += ::protobuf::rt::int32_size(1, 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.selected_pairing_method {
            os.write_enum(1, ::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() -> ThpSelectMethod {
        ThpSelectMethod::new()
    }

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpPairingPreparationsFinished)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ThpPairingPreparationsFinished {
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpPairingPreparationsFinished.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(0);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpPairingPreparationsFinished>(
            "ThpPairingPreparationsFinished",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                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;
        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<()> {
        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() -> ThpPairingPreparationsFinished {
        ThpPairingPreparationsFinished::new()
    }

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

    fn default_instance() -> &'static ThpPairingPreparationsFinished {
        static instance: ThpPairingPreparationsFinished = ThpPairingPreparationsFinished {
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

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

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

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

    // required bytes commitment = 1;

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

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

    pub fn has_commitment(&self) -> bool {
        self.commitment.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

    // required bytes challenge = 1;

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

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

    pub fn has_challenge(&self) -> bool {
        self.challenge.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

    // required bytes cpace_trezor_public_key = 1;

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

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

    pub fn has_cpace_trezor_public_key(&self) -> bool {
        self.cpace_trezor_public_key.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

    // required bytes cpace_host_public_key = 1;

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

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

    pub fn has_cpace_host_public_key(&self) -> bool {
        self.cpace_host_public_key.is_some()
    }

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

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

    // required bytes tag = 2;

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

    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: ::std::vec::Vec<u8>) {
        self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.tag.is_none() {
            self.tag = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.tag.as_mut().unwrap()
    }

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

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

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

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

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

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

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

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

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

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

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

    // required bytes secret = 1;

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

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

    pub fn has_secret(&self) -> bool {
        self.secret.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

    // required bytes tag = 1;

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

    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: ::std::vec::Vec<u8>) {
        self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.tag.is_none() {
            self.tag = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.tag.as_mut().unwrap()
    }

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

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

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

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

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

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

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

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

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

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

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

    // required bytes secret = 1;

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

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

    pub fn has_secret(&self) -> bool {
        self.secret.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

    // required bytes tag = 1;

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

    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: ::std::vec::Vec<u8>) {
        self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.tag.is_none() {
            self.tag = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.tag.as_mut().unwrap()
    }

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

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

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

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

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

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

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

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

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

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

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

    // required bytes tag = 1;

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

    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: ::std::vec::Vec<u8>) {
        self.tag = ::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_tag(&mut self) -> &mut ::std::vec::Vec<u8> {
        if self.tag.is_none() {
            self.tag = ::std::option::Option::Some(::std::vec::Vec::new());
        }
        self.tag.as_mut().unwrap()
    }

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

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

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

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

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

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

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

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

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

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

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

    // required bytes host_static_public_key = 1;

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

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

    pub fn has_host_static_public_key(&self) -> bool {
        self.host_static_public_key.is_some()
    }

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

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

    // optional bool autoconnect = 2;

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

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

    pub fn has_autoconnect(&self) -> bool {
        self.autoconnect.is_some()
    }

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

    // optional bytes credential = 3;

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

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

    pub fn has_credential(&self) -> bool {
        self.credential.is_some()
    }

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

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

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

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

    fn is_initialized(&self) -> bool {
        if self.host_static_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.host_static_public_key = ::std::option::Option::Some(is.read_bytes()?);
                },
                16 => {
                    self.autoconnect = ::std::option::Option::Some(is.read_bool()?);
                },
                26 => {
                    self.credential = ::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.host_static_public_key.as_ref() {
            my_size += ::protobuf::rt::bytes_size(1, &v);
        }
        if let Some(v) = self.autoconnect {
            my_size += 1 + 1;
        }
        if let Some(v) = self.credential.as_ref() {
            my_size += ::protobuf::rt::bytes_size(3, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

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

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

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

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

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

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

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

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

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

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

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

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

    // required bytes trezor_static_public_key = 1;

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

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

    pub fn has_trezor_static_public_key(&self) -> bool {
        self.trezor_static_public_key.is_some()
    }

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

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

    // required bytes credential = 2;

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

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

    pub fn has_credential(&self) -> bool {
        self.credential.is_some()
    }

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

    // Take field
    pub fn take_credential(&mut self) -> ::std::vec::Vec<u8> {
        self.credential.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::<_, _>(
            "trezor_static_public_key",
            |m: &ThpCredentialResponse| { &m.trezor_static_public_key },
            |m: &mut ThpCredentialResponse| { &mut m.trezor_static_public_key },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "credential",
            |m: &ThpCredentialResponse| { &m.credential },
            |m: &mut ThpCredentialResponse| { &mut m.credential },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpCredentialResponse>(
            "ThpCredentialResponse",
            fields,
            oneofs,
        )
    }
}

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

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

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpEndRequest)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ThpEndRequest {
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpEndRequest.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(0);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpEndRequest>(
            "ThpEndRequest",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                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;
        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<()> {
        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() -> ThpEndRequest {
        ThpEndRequest::new()
    }

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

    fn default_instance() -> &'static ThpEndRequest {
        static instance: ThpEndRequest = ThpEndRequest {
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpEndResponse)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct ThpEndResponse {
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpEndResponse.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
        let mut fields = ::std::vec::Vec::with_capacity(0);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpEndResponse>(
            "ThpEndResponse",
            fields,
            oneofs,
        )
    }
}

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

    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 {
                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;
        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<()> {
        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() -> ThpEndResponse {
        ThpEndResponse::new()
    }

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

    fn default_instance() -> &'static ThpEndResponse {
        static instance: ThpEndResponse = ThpEndResponse {
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

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

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

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

    // required string host_name = 1;

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

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

    pub fn has_host_name(&self) -> bool {
        self.host_name.is_some()
    }

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

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

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

    // optional bool autoconnect = 2;

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

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

    pub fn has_autoconnect(&self) -> bool {
        self.autoconnect.is_some()
    }

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

    // required string app_name = 3;

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

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

    pub fn has_app_name(&self) -> bool {
        self.app_name.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    // required 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_message_field_accessor::<_, ThpCredentialMetadata>(
            "cred_metadata",
            |m: &ThpPairingCredential| { &m.cred_metadata },
            |m: &mut ThpPairingCredential| { &mut m.cred_metadata },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "mac",
            |m: &ThpPairingCredential| { &m.mac },
            |m: &mut ThpPairingCredential| { &mut m.mac },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpPairingCredential>(
            "ThpPairingCredential",
            fields,
            oneofs,
        )
    }
}

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

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

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

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

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

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

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

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

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

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

    // required bytes host_static_public_key = 1;

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

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

    pub fn has_host_static_public_key(&self) -> bool {
        self.host_static_public_key.is_some()
    }

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

    // Take field
    pub fn take_host_static_public_key(&mut self) -> ::std::vec::Vec<u8> {
        self.host_static_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(2);
        let mut oneofs = ::std::vec::Vec::with_capacity(0);
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "host_static_public_key",
            |m: &ThpAuthenticatedCredentialData| { &m.host_static_public_key },
            |m: &mut ThpAuthenticatedCredentialData| { &mut m.host_static_public_key },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, ThpCredentialMetadata>(
            "cred_metadata",
            |m: &ThpAuthenticatedCredentialData| { &m.cred_metadata },
            |m: &mut ThpAuthenticatedCredentialData| { &mut m.cred_metadata },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpAuthenticatedCredentialData>(
            "ThpAuthenticatedCredentialData",
            fields,
            oneofs,
        )
    }
}

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

    fn is_initialized(&self) -> bool {
        if self.host_static_public_key.is_none() {
            return false;
        }
        if self.cred_metadata.is_none() {
            return false;
        }
        for v in &self.cred_metadata {
            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.host_static_public_key = ::std::option::Option::Some(is.read_bytes()?);
                },
                18 => {
                    ::protobuf::rt::read_singular_message_into_field(is, &mut self.cred_metadata)?;
                },
                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.host_static_public_key.as_ref() {
            my_size += ::protobuf::rt::bytes_size(1, &v);
        }
        if let Some(v) = self.cred_metadata.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.host_static_public_key.as_ref() {
            os.write_bytes(1, v)?;
        }
        if let Some(v) = self.cred_metadata.as_ref() {
            ::protobuf::rt::write_message_field_with_cached_size(2, 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() -> ThpAuthenticatedCredentialData {
        ThpAuthenticatedCredentialData::new()
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/// Nested message and enums of message `ThpPairedCache`
pub mod thp_paired_cache {
    // @@protoc_insertion_point(message:hw.trezor.messages.thp.ThpPairedCache.ThpPairedCacheEntry)
    #[derive(PartialEq,Clone,Default,Debug)]
    pub struct ThpPairedCacheEntry {
        // message fields
        // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpPairedCache.ThpPairedCacheEntry.mac_addr)
        pub mac_addr: ::std::option::Option<::std::vec::Vec<u8>>,
        // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpPairedCache.ThpPairedCacheEntry.host_name)
        pub host_name: ::std::option::Option<::std::string::String>,
        // @@protoc_insertion_point(field:hw.trezor.messages.thp.ThpPairedCache.ThpPairedCacheEntry.app_name)
        pub app_name: ::std::option::Option<::std::string::String>,
        // special fields
        // @@protoc_insertion_point(special_field:hw.trezor.messages.thp.ThpPairedCache.ThpPairedCacheEntry.special_fields)
        pub special_fields: ::protobuf::SpecialFields,
    }

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

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

        // required bytes mac_addr = 1;

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

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

        pub fn has_mac_addr(&self) -> bool {
            self.mac_addr.is_some()
        }

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

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

        // required string host_name = 2;

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

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

        pub fn has_host_name(&self) -> bool {
            self.host_name.is_some()
        }

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

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

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

        // required string app_name = 3;

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

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

        pub fn has_app_name(&self) -> bool {
            self.app_name.is_some()
        }

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

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

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

        pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
            let mut fields = ::std::vec::Vec::with_capacity(3);
            let mut oneofs = ::std::vec::Vec::with_capacity(0);
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "mac_addr",
                |m: &ThpPairedCacheEntry| { &m.mac_addr },
                |m: &mut ThpPairedCacheEntry| { &mut m.mac_addr },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "host_name",
                |m: &ThpPairedCacheEntry| { &m.host_name },
                |m: &mut ThpPairedCacheEntry| { &mut m.host_name },
            ));
            fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
                "app_name",
                |m: &ThpPairedCacheEntry| { &m.app_name },
                |m: &mut ThpPairedCacheEntry| { &mut m.app_name },
            ));
            ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<ThpPairedCacheEntry>(
                "ThpPairedCache.ThpPairedCacheEntry",
                fields,
                oneofs,
            )
        }
    }

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

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

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

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

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

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

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

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

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

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.thp.ThpMessageType)
pub enum ThpMessageType {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_Cancel)
    ThpMessageType_Cancel = 20,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ButtonRequest)
    ThpMessageType_ButtonRequest = 26,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ButtonAck)
    ThpMessageType_ButtonAck = 27,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpPairingRequest)
    ThpMessageType_ThpPairingRequest = 1008,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpPairingRequestApproved)
    ThpMessageType_ThpPairingRequestApproved = 1009,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpSelectMethod)
    ThpMessageType_ThpSelectMethod = 1010,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpPairingPreparationsFinished)
    ThpMessageType_ThpPairingPreparationsFinished = 1011,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCredentialRequest)
    ThpMessageType_ThpCredentialRequest = 1016,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCredentialResponse)
    ThpMessageType_ThpCredentialResponse = 1017,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpEndRequest)
    ThpMessageType_ThpEndRequest = 1018,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpEndResponse)
    ThpMessageType_ThpEndResponse = 1019,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCodeEntryCommitment)
    ThpMessageType_ThpCodeEntryCommitment = 1024,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCodeEntryChallenge)
    ThpMessageType_ThpCodeEntryChallenge = 1025,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCodeEntryCpaceTrezor)
    ThpMessageType_ThpCodeEntryCpaceTrezor = 1026,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCodeEntryCpaceHostTag)
    ThpMessageType_ThpCodeEntryCpaceHostTag = 1027,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpCodeEntrySecret)
    ThpMessageType_ThpCodeEntrySecret = 1028,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpQrCodeTag)
    ThpMessageType_ThpQrCodeTag = 1032,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpQrCodeSecret)
    ThpMessageType_ThpQrCodeSecret = 1033,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpNfcTagHost)
    ThpMessageType_ThpNfcTagHost = 1040,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpMessageType.ThpMessageType_ThpNfcTagTrezor)
    ThpMessageType_ThpNfcTagTrezor = 1041,
}

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

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

    fn from_i32(value: i32) -> ::std::option::Option<ThpMessageType> {
        match value {
            20 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_Cancel),
            26 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ButtonRequest),
            27 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ButtonAck),
            1008 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpPairingRequest),
            1009 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpPairingRequestApproved),
            1010 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpSelectMethod),
            1011 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpPairingPreparationsFinished),
            1016 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCredentialRequest),
            1017 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCredentialResponse),
            1018 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpEndRequest),
            1019 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpEndResponse),
            1024 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryCommitment),
            1025 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryChallenge),
            1026 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryCpaceTrezor),
            1027 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryCpaceHostTag),
            1028 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntrySecret),
            1032 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpQrCodeTag),
            1033 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpQrCodeSecret),
            1040 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpNfcTagHost),
            1041 => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpNfcTagTrezor),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<ThpMessageType> {
        match str {
            "ThpMessageType_Cancel" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_Cancel),
            "ThpMessageType_ButtonRequest" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ButtonRequest),
            "ThpMessageType_ButtonAck" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ButtonAck),
            "ThpMessageType_ThpPairingRequest" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpPairingRequest),
            "ThpMessageType_ThpPairingRequestApproved" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpPairingRequestApproved),
            "ThpMessageType_ThpSelectMethod" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpSelectMethod),
            "ThpMessageType_ThpPairingPreparationsFinished" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpPairingPreparationsFinished),
            "ThpMessageType_ThpCredentialRequest" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCredentialRequest),
            "ThpMessageType_ThpCredentialResponse" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCredentialResponse),
            "ThpMessageType_ThpEndRequest" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpEndRequest),
            "ThpMessageType_ThpEndResponse" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpEndResponse),
            "ThpMessageType_ThpCodeEntryCommitment" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryCommitment),
            "ThpMessageType_ThpCodeEntryChallenge" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryChallenge),
            "ThpMessageType_ThpCodeEntryCpaceTrezor" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryCpaceTrezor),
            "ThpMessageType_ThpCodeEntryCpaceHostTag" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntryCpaceHostTag),
            "ThpMessageType_ThpCodeEntrySecret" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpCodeEntrySecret),
            "ThpMessageType_ThpQrCodeTag" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpQrCodeTag),
            "ThpMessageType_ThpQrCodeSecret" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpQrCodeSecret),
            "ThpMessageType_ThpNfcTagHost" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpNfcTagHost),
            "ThpMessageType_ThpNfcTagTrezor" => ::std::option::Option::Some(ThpMessageType::ThpMessageType_ThpNfcTagTrezor),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [ThpMessageType] = &[
        ThpMessageType::ThpMessageType_Cancel,
        ThpMessageType::ThpMessageType_ButtonRequest,
        ThpMessageType::ThpMessageType_ButtonAck,
        ThpMessageType::ThpMessageType_ThpPairingRequest,
        ThpMessageType::ThpMessageType_ThpPairingRequestApproved,
        ThpMessageType::ThpMessageType_ThpSelectMethod,
        ThpMessageType::ThpMessageType_ThpPairingPreparationsFinished,
        ThpMessageType::ThpMessageType_ThpCredentialRequest,
        ThpMessageType::ThpMessageType_ThpCredentialResponse,
        ThpMessageType::ThpMessageType_ThpEndRequest,
        ThpMessageType::ThpMessageType_ThpEndResponse,
        ThpMessageType::ThpMessageType_ThpCodeEntryCommitment,
        ThpMessageType::ThpMessageType_ThpCodeEntryChallenge,
        ThpMessageType::ThpMessageType_ThpCodeEntryCpaceTrezor,
        ThpMessageType::ThpMessageType_ThpCodeEntryCpaceHostTag,
        ThpMessageType::ThpMessageType_ThpCodeEntrySecret,
        ThpMessageType::ThpMessageType_ThpQrCodeTag,
        ThpMessageType::ThpMessageType_ThpQrCodeSecret,
        ThpMessageType::ThpMessageType_ThpNfcTagHost,
        ThpMessageType::ThpMessageType_ThpNfcTagTrezor,
    ];
}

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

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = match self {
            ThpMessageType::ThpMessageType_Cancel => 0,
            ThpMessageType::ThpMessageType_ButtonRequest => 1,
            ThpMessageType::ThpMessageType_ButtonAck => 2,
            ThpMessageType::ThpMessageType_ThpPairingRequest => 3,
            ThpMessageType::ThpMessageType_ThpPairingRequestApproved => 4,
            ThpMessageType::ThpMessageType_ThpSelectMethod => 5,
            ThpMessageType::ThpMessageType_ThpPairingPreparationsFinished => 6,
            ThpMessageType::ThpMessageType_ThpCredentialRequest => 7,
            ThpMessageType::ThpMessageType_ThpCredentialResponse => 8,
            ThpMessageType::ThpMessageType_ThpEndRequest => 9,
            ThpMessageType::ThpMessageType_ThpEndResponse => 10,
            ThpMessageType::ThpMessageType_ThpCodeEntryCommitment => 11,
            ThpMessageType::ThpMessageType_ThpCodeEntryChallenge => 12,
            ThpMessageType::ThpMessageType_ThpCodeEntryCpaceTrezor => 13,
            ThpMessageType::ThpMessageType_ThpCodeEntryCpaceHostTag => 14,
            ThpMessageType::ThpMessageType_ThpCodeEntrySecret => 15,
            ThpMessageType::ThpMessageType_ThpQrCodeTag => 16,
            ThpMessageType::ThpMessageType_ThpQrCodeSecret => 17,
            ThpMessageType::ThpMessageType_ThpNfcTagHost => 18,
            ThpMessageType::ThpMessageType_ThpNfcTagTrezor => 19,
        };
        Self::enum_descriptor().value_by_index(index)
    }
}

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

impl ThpMessageType {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<ThpMessageType>("ThpMessageType")
    }
}

#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.thp.ThpPairingMethod)
pub enum ThpPairingMethod {
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.SkipPairing)
    SkipPairing = 1,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.CodeEntry)
    CodeEntry = 2,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.QrCode)
    QrCode = 3,
    // @@protoc_insertion_point(enum_value:hw.trezor.messages.thp.ThpPairingMethod.NFC)
    NFC = 4,
}

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

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

    fn from_i32(value: i32) -> ::std::option::Option<ThpPairingMethod> {
        match value {
            1 => ::std::option::Option::Some(ThpPairingMethod::SkipPairing),
            2 => ::std::option::Option::Some(ThpPairingMethod::CodeEntry),
            3 => ::std::option::Option::Some(ThpPairingMethod::QrCode),
            4 => ::std::option::Option::Some(ThpPairingMethod::NFC),
            _ => ::std::option::Option::None
        }
    }

    fn from_str(str: &str) -> ::std::option::Option<ThpPairingMethod> {
        match str {
            "SkipPairing" => ::std::option::Option::Some(ThpPairingMethod::SkipPairing),
            "CodeEntry" => ::std::option::Option::Some(ThpPairingMethod::CodeEntry),
            "QrCode" => ::std::option::Option::Some(ThpPairingMethod::QrCode),
            "NFC" => ::std::option::Option::Some(ThpPairingMethod::NFC),
            _ => ::std::option::Option::None
        }
    }

    const VALUES: &'static [ThpPairingMethod] = &[
        ThpPairingMethod::SkipPairing,
        ThpPairingMethod::CodeEntry,
        ThpPairingMethod::QrCode,
        ThpPairingMethod::NFC,
    ];
}

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

    fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
        let index = match self {
            ThpPairingMethod::SkipPairing => 0,
            ThpPairingMethod::CodeEntry => 1,
            ThpPairingMethod::QrCode => 2,
            ThpPairingMethod::NFC => 3,
        };
        Self::enum_descriptor().value_by_index(index)
    }
}

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

impl ThpPairingMethod {
    fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
        ::protobuf::reflect::GeneratedEnumDescriptorData::new::<ThpPairingMethod>("ThpPairingMethod")
    }
}

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x12messages-thp.proto\x12\x16hw.trezor.messages.thp\x1a\roptions.prot\
    o\"\xa3\x02\n\x13ThpDeviceProperties\x12%\n\x0einternal_model\x18\x01\
    \x20\x02(\tR\rinternalModel\x12&\n\rmodel_variant\x18\x02\x20\x01(\r:\
    \x010R\x0cmodelVariant\x124\n\x16protocol_version_major\x18\x03\x20\x02(\
    \rR\x14protocolVersionMajor\x124\n\x16protocol_version_minor\x18\x04\x20\
    \x02(\rR\x14protocolVersionMinor\x12Q\n\x0fpairing_methods\x18\x05\x20\
    \x03(\x0e2(.hw.trezor.messages.thp.ThpPairingMethodR\x0epairingMethods\"\
    _\n%ThpHandshakeCompletionReqNoisePayload\x126\n\x17host_pairing_credent\
    ial\x18\x01\x20\x01(\x0cR\x15hostPairingCredential\"\x87\x01\n\x13ThpCre\
    ateNewSession\x12\x1e\n\npassphrase\x18\x01\x20\x01(\tR\npassphrase\x12\
    \"\n\ton_device\x18\x02\x20\x01(\x08:\x05falseR\x08onDevice\x12,\n\x0ede\
    rive_cardano\x18\x03\x20\x01(\x08:\x05falseR\rderiveCardano\"K\n\x11ThpP\
    airingRequest\x12\x1b\n\thost_name\x18\x01\x20\x02(\tR\x08hostName\x12\
    \x19\n\x08app_name\x18\x02\x20\x02(\tR\x07appName\"\x1b\n\x19ThpPairingR\
    equestApproved\"s\n\x0fThpSelectMethod\x12`\n\x17selected_pairing_method\
    \x18\x01\x20\x02(\x0e2(.hw.trezor.messages.thp.ThpPairingMethodR\x15sele\
    ctedPairingMethod\"\x20\n\x1eThpPairingPreparationsFinished\"8\n\x16ThpC\
    odeEntryCommitment\x12\x1e\n\ncommitment\x18\x01\x20\x02(\x0cR\ncommitme\
    nt\"5\n\x15ThpCodeEntryChallenge\x12\x1c\n\tchallenge\x18\x01\x20\x02(\
    \x0cR\tchallenge\"P\n\x17ThpCodeEntryCpaceTrezor\x125\n\x17cpace_trezor_\
    public_key\x18\x01\x20\x02(\x0cR\x14cpaceTrezorPublicKey\"_\n\x18ThpCode\
    EntryCpaceHostTag\x121\n\x15cpace_host_public_key\x18\x01\x20\x02(\x0cR\
    \x12cpaceHostPublicKey\x12\x10\n\x03tag\x18\x02\x20\x02(\x0cR\x03tag\",\
    \n\x12ThpCodeEntrySecret\x12\x16\n\x06secret\x18\x01\x20\x02(\x0cR\x06se\
    cret\"\x20\n\x0cThpQrCodeTag\x12\x10\n\x03tag\x18\x01\x20\x02(\x0cR\x03t\
    ag\")\n\x0fThpQrCodeSecret\x12\x16\n\x06secret\x18\x01\x20\x02(\x0cR\x06\
    secret\"!\n\rThpNfcTagHost\x12\x10\n\x03tag\x18\x01\x20\x02(\x0cR\x03tag\
    \"#\n\x0fThpNfcTagTrezor\x12\x10\n\x03tag\x18\x01\x20\x02(\x0cR\x03tag\"\
    \x94\x01\n\x14ThpCredentialRequest\x123\n\x16host_static_public_key\x18\
    \x01\x20\x02(\x0cR\x13hostStaticPublicKey\x12'\n\x0bautoconnect\x18\x02\
    \x20\x01(\x08:\x05falseR\x0bautoconnect\x12\x1e\n\ncredential\x18\x03\
    \x20\x01(\x0cR\ncredential\"p\n\x15ThpCredentialResponse\x127\n\x18trezo\
    r_static_public_key\x18\x01\x20\x02(\x0cR\x15trezorStaticPublicKey\x12\
    \x1e\n\ncredential\x18\x02\x20\x02(\x0cR\ncredential\"\x0f\n\rThpEndRequ\
    est\"\x10\n\x0eThpEndResponse\"w\n\x15ThpCredentialMetadata\x12\x1b\n\th\
    ost_name\x18\x01\x20\x02(\tR\x08hostName\x12\x20\n\x0bautoconnect\x18\
    \x02\x20\x01(\x08R\x0bautoconnect\x12\x19\n\x08app_name\x18\x03\x20\x02(\
    \tR\x07appName:\x04\x98\xb2\x19\x01\"\x82\x01\n\x14ThpPairingCredential\
    \x12R\n\rcred_metadata\x18\x01\x20\x02(\x0b2-.hw.trezor.messages.thp.Thp\
    CredentialMetadataR\x0ccredMetadata\x12\x10\n\x03mac\x18\x02\x20\x02(\
    \x0cR\x03mac:\x04\x98\xb2\x19\x01\"\xaf\x01\n\x1eThpAuthenticatedCredent\
    ialData\x123\n\x16host_static_public_key\x18\x01\x20\x02(\x0cR\x13hostSt\
    aticPublicKey\x12R\n\rcred_metadata\x18\x02\x20\x02(\x0b2-.hw.trezor.mes\
    sages.thp.ThpCredentialMetadataR\x0ccredMetadata:\x04\x98\xb2\x19\x01\"\
    \xdc\x01\n\x0eThpPairedCache\x12T\n\x07entries\x18\x01\x20\x03(\x0b2:.hw\
    .trezor.messages.thp.ThpPairedCache.ThpPairedCacheEntryR\x07entries\x1an\
    \n\x13ThpPairedCacheEntry\x12\x19\n\x08mac_addr\x18\x01\x20\x02(\x0cR\
    \x07macAddr\x12\x1b\n\thost_name\x18\x02\x20\x02(\tR\x08hostName\x12\x19\
    \n\x08app_name\x18\x03\x20\x02(\tR\x07appName:\x04\x98\xb2\x19\x01:\x04\
    \x98\xb2\x19\x01*\xfb\x06\n\x0eThpMessageType\x12\x19\n\x15ThpMessageTyp\
    e_Cancel\x10\x14\x12\x20\n\x1cThpMessageType_ButtonRequest\x10\x1a\x12\
    \x1c\n\x18ThpMessageType_ButtonAck\x10\x1b\x12%\n\x20ThpMessageType_ThpP\
    airingRequest\x10\xf0\x07\x12-\n(ThpMessageType_ThpPairingRequestApprove\
    d\x10\xf1\x07\x12#\n\x1eThpMessageType_ThpSelectMethod\x10\xf2\x07\x122\
    \n-ThpMessageType_ThpPairingPreparationsFinished\x10\xf3\x07\x12(\n#ThpM\
    essageType_ThpCredentialRequest\x10\xf8\x07\x12)\n$ThpMessageType_ThpCre\
    dentialResponse\x10\xf9\x07\x12!\n\x1cThpMessageType_ThpEndRequest\x10\
    \xfa\x07\x12\"\n\x1dThpMessageType_ThpEndResponse\x10\xfb\x07\x12*\n%Thp\
    MessageType_ThpCodeEntryCommitment\x10\x80\x08\x12)\n$ThpMessageType_Thp\
    CodeEntryChallenge\x10\x81\x08\x12+\n&ThpMessageType_ThpCodeEntryCpaceTr\
    ezor\x10\x82\x08\x12,\n'ThpMessageType_ThpCodeEntryCpaceHostTag\x10\x83\
    \x08\x12&\n!ThpMessageType_ThpCodeEntrySecret\x10\x84\x08\x12\x20\n\x1bT\
    hpMessageType_ThpQrCodeTag\x10\x88\x08\x12#\n\x1eThpMessageType_ThpQrCod\
    eSecret\x10\x89\x08\x12!\n\x1cThpMessageType_ThpNfcTagHost\x10\x90\x08\
    \x12#\n\x1eThpMessageType_ThpNfcTagTrezor\x10\x91\x08\x1a\x04\xd0\xf3\
    \x18\x01\"\x04\x08\0\x10\x13\"\x04\x08\x15\x10\x19\"\x05\x08\x1c\x10\xe7\
    \x07\"\x06\x08\xe8\x07\x10\xe8\x07\"\x06\x08\xe9\x07\x10\xef\x07\"\x06\
    \x08\xf4\x07\x10\xf7\x07\"\x06\x08\xfc\x07\x10\xff\x07\"\x06\x08\x85\x08\
    \x10\x87\x08\"\x06\x08\x8a\x08\x10\x8f\x08\"\x06\x08\x92\x08\x10\xcb\x08\
    \"\t\x08\xcc\x08\x10\xff\xff\xff\xff\x07*G\n\x10ThpPairingMethod\x12\x0f\
    \n\x0bSkipPairing\x10\x01\x12\r\n\tCodeEntry\x10\x02\x12\n\n\x06QrCode\
    \x10\x03\x12\x07\n\x03NFC\x10\x04B;\n#com.satoshilabs.trezor.lib.protobu\
    fB\x10TrezorMessageThp\x80\xa6\x1d\x01\
";

/// `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::options::file_descriptor().clone());
            let mut messages = ::std::vec::Vec::with_capacity(25);
            messages.push(ThpDeviceProperties::generated_message_descriptor_data());
            messages.push(ThpHandshakeCompletionReqNoisePayload::generated_message_descriptor_data());
            messages.push(ThpCreateNewSession::generated_message_descriptor_data());
            messages.push(ThpPairingRequest::generated_message_descriptor_data());
            messages.push(ThpPairingRequestApproved::generated_message_descriptor_data());
            messages.push(ThpSelectMethod::generated_message_descriptor_data());
            messages.push(ThpPairingPreparationsFinished::generated_message_descriptor_data());
            messages.push(ThpCodeEntryCommitment::generated_message_descriptor_data());
            messages.push(ThpCodeEntryChallenge::generated_message_descriptor_data());
            messages.push(ThpCodeEntryCpaceTrezor::generated_message_descriptor_data());
            messages.push(ThpCodeEntryCpaceHostTag::generated_message_descriptor_data());
            messages.push(ThpCodeEntrySecret::generated_message_descriptor_data());
            messages.push(ThpQrCodeTag::generated_message_descriptor_data());
            messages.push(ThpQrCodeSecret::generated_message_descriptor_data());
            messages.push(ThpNfcTagHost::generated_message_descriptor_data());
            messages.push(ThpNfcTagTrezor::generated_message_descriptor_data());
            messages.push(ThpCredentialRequest::generated_message_descriptor_data());
            messages.push(ThpCredentialResponse::generated_message_descriptor_data());
            messages.push(ThpEndRequest::generated_message_descriptor_data());
            messages.push(ThpEndResponse::generated_message_descriptor_data());
            messages.push(ThpCredentialMetadata::generated_message_descriptor_data());
            messages.push(ThpPairingCredential::generated_message_descriptor_data());
            messages.push(ThpAuthenticatedCredentialData::generated_message_descriptor_data());
            messages.push(ThpPairedCache::generated_message_descriptor_data());
            messages.push(thp_paired_cache::ThpPairedCacheEntry::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(2);
            enums.push(ThpMessageType::generated_enum_descriptor_data());
            enums.push(ThpPairingMethod::generated_enum_descriptor_data());
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
