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

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

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

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

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

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

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

    fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
        for v in &self.address_n {
            os.write_uint32(1, *v)?;
        };
        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() -> NostrGetPubkey {
        NostrGetPubkey::new()
    }

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

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

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

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

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

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

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

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

    // required bytes pubkey = 1;

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

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

    pub fn has_pubkey(&self) -> bool {
        self.pubkey.is_some()
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

    // required string key = 1;

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

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

    pub fn has_key(&self) -> bool {
        self.key.is_some()
    }

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

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

    // optional string value = 2;

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

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

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

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

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

    // Take field
    pub fn take_value(&mut self) -> ::std::string::String {
        self.value.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::<_, _>(
            "key",
            |m: &NostrTag| { &m.key },
            |m: &mut NostrTag| { &mut m.key },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
            "value",
            |m: &NostrTag| { &m.value },
            |m: &mut NostrTag| { &mut m.value },
        ));
        fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
            "extra",
            |m: &NostrTag| { &m.extra },
            |m: &mut NostrTag| { &mut m.extra },
        ));
        ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NostrTag>(
            "NostrTag",
            fields,
            oneofs,
        )
    }
}

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

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

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

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

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

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

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

// @@protoc_insertion_point(message:hw.trezor.messages.nostr.NostrSignEvent)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NostrSignEvent {
    // message fields
    // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrSignEvent.address_n)
    pub address_n: ::std::vec::Vec<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrSignEvent.created_at)
    pub created_at: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrSignEvent.kind)
    pub kind: ::std::option::Option<u32>,
    // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrSignEvent.tags)
    pub tags: ::std::vec::Vec<NostrTag>,
    // @@protoc_insertion_point(field:hw.trezor.messages.nostr.NostrSignEvent.content)
    pub content: ::std::option::Option<::std::string::String>,
    // special fields
    // @@protoc_insertion_point(special_field:hw.trezor.messages.nostr.NostrSignEvent.special_fields)
    pub special_fields: ::protobuf::SpecialFields,
}

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

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

    // required uint32 created_at = 2;

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

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

    pub fn has_created_at(&self) -> bool {
        self.created_at.is_some()
    }

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

    // required uint32 kind = 3;

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

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

    pub fn has_kind(&self) -> bool {
        self.kind.is_some()
    }

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

    // required string content = 5;

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

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

    pub fn has_content(&self) -> bool {
        self.content.is_some()
    }

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

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

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

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

    fn is_initialized(&self) -> bool {
        if self.created_at.is_none() {
            return false;
        }
        if self.kind.is_none() {
            return false;
        }
        if self.content.is_none() {
            return false;
        }
        for v in &self.tags {
            if !v.is_initialized() {
                return false;
            }
        };
        true
    }

    fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
        while let Some(tag) = is.read_raw_tag_or_eof()? {
            match tag {
                10 => {
                    is.read_repeated_packed_uint32_into(&mut self.address_n)?;
                },
                8 => {
                    self.address_n.push(is.read_uint32()?);
                },
                16 => {
                    self.created_at = ::std::option::Option::Some(is.read_uint32()?);
                },
                24 => {
                    self.kind = ::std::option::Option::Some(is.read_uint32()?);
                },
                34 => {
                    self.tags.push(is.read_message()?);
                },
                42 => {
                    self.content = ::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;
        for value in &self.address_n {
            my_size += ::protobuf::rt::uint32_size(1, *value);
        };
        if let Some(v) = self.created_at {
            my_size += ::protobuf::rt::uint32_size(2, v);
        }
        if let Some(v) = self.kind {
            my_size += ::protobuf::rt::uint32_size(3, v);
        }
        for value in &self.tags {
            let len = value.compute_size();
            my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
        };
        if let Some(v) = self.content.as_ref() {
            my_size += ::protobuf::rt::string_size(5, &v);
        }
        my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
        self.special_fields.cached_size().set(my_size as u32);
        my_size
    }

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

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

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

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

    fn clear(&mut self) {
        self.address_n.clear();
        self.created_at = ::std::option::Option::None;
        self.kind = ::std::option::Option::None;
        self.tags.clear();
        self.content = ::std::option::Option::None;
        self.special_fields.clear();
    }

    fn default_instance() -> &'static NostrSignEvent {
        static instance: NostrSignEvent = NostrSignEvent {
            address_n: ::std::vec::Vec::new(),
            created_at: ::std::option::Option::None,
            kind: ::std::option::Option::None,
            tags: ::std::vec::Vec::new(),
            content: ::std::option::Option::None,
            special_fields: ::protobuf::SpecialFields::new(),
        };
        &instance
    }
}

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

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

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

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

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

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

    // required bytes pubkey = 1;

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

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

    pub fn has_pubkey(&self) -> bool {
        self.pubkey.is_some()
    }

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

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

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

    // required bytes id = 2;

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

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

    pub fn has_id(&self) -> bool {
        self.id.is_some()
    }

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

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

    // required bytes signature = 3;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

static file_descriptor_proto_data: &'static [u8] = b"\
    \n\x14messages-nostr.proto\x12\x18hw.trezor.messages.nostr\"-\n\x0eNostr\
    GetPubkey\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\"%\n\x0bN\
    ostrPubkey\x12\x16\n\x06pubkey\x18\x01\x20\x02(\x0cR\x06pubkey\"H\n\x08N\
    ostrTag\x12\x10\n\x03key\x18\x01\x20\x02(\tR\x03key\x12\x14\n\x05value\
    \x18\x02\x20\x01(\tR\x05value\x12\x14\n\x05extra\x18\x03\x20\x03(\tR\x05\
    extra\"\xb2\x01\n\x0eNostrSignEvent\x12\x1b\n\taddress_n\x18\x01\x20\x03\
    (\rR\x08addressN\x12\x1d\n\ncreated_at\x18\x02\x20\x02(\rR\tcreatedAt\
    \x12\x12\n\x04kind\x18\x03\x20\x02(\rR\x04kind\x126\n\x04tags\x18\x04\
    \x20\x03(\x0b2\".hw.trezor.messages.nostr.NostrTagR\x04tags\x12\x18\n\
    \x07content\x18\x05\x20\x02(\tR\x07content\"[\n\x13NostrEventSignature\
    \x12\x16\n\x06pubkey\x18\x01\x20\x02(\x0cR\x06pubkey\x12\x0e\n\x02id\x18\
    \x02\x20\x02(\x0cR\x02id\x12\x1c\n\tsignature\x18\x03\x20\x02(\x0cR\tsig\
    natureB9\n#com.satoshilabs.trezor.lib.protobufB\x12TrezorMessageNostr\
";

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

/// `FileDescriptor` object which allows dynamic access to files
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
    static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
    static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
    file_descriptor.get(|| {
        let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
            let mut deps = ::std::vec::Vec::with_capacity(0);
            let mut messages = ::std::vec::Vec::with_capacity(5);
            messages.push(NostrGetPubkey::generated_message_descriptor_data());
            messages.push(NostrPubkey::generated_message_descriptor_data());
            messages.push(NostrTag::generated_message_descriptor_data());
            messages.push(NostrSignEvent::generated_message_descriptor_data());
            messages.push(NostrEventSignature::generated_message_descriptor_data());
            let mut enums = ::std::vec::Vec::with_capacity(0);
            ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
                file_descriptor_proto(),
                deps,
                messages,
                enums,
            )
        });
        ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
    })
}
