You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trezor-firmware/rust/trezor-client/src/protos/generated/messages_nem.rs

4999 lines
195 KiB

// This file is generated by rust-protobuf 3.3.0. Do not edit
// .proto file is parsed by protoc 3.20.1
// @generated
// https://github.com/rust-lang/rust-clippy/issues/702
#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
//! Generated file from `messages-nem.proto`
/// Generated files are compatible only with the same version
/// of protobuf runtime.
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMGetAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMGetAddress {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMGetAddress.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMGetAddress.network)
pub network: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMGetAddress.show_display)
pub show_display: ::std::option::Option<bool>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMGetAddress.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMGetAddress.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMGetAddress {
fn default() -> &'a NEMGetAddress {
<NEMGetAddress as ::protobuf::Message>::default_instance()
}
}
impl NEMGetAddress {
pub fn new() -> NEMGetAddress {
::std::default::Default::default()
}
// optional uint32 network = 2;
pub fn network(&self) -> u32 {
self.network.unwrap_or(104u32)
}
pub fn clear_network(&mut self) {
self.network = ::std::option::Option::None;
}
pub fn has_network(&self) -> bool {
self.network.is_some()
}
// Param is passed by value, moved
pub fn set_network(&mut self, v: u32) {
self.network = ::std::option::Option::Some(v);
}
// optional bool show_display = 3;
pub fn show_display(&self) -> bool {
self.show_display.unwrap_or(false)
}
pub fn clear_show_display(&mut self) {
self.show_display = ::std::option::Option::None;
}
pub fn has_show_display(&self) -> bool {
self.show_display.is_some()
}
// Param is passed by value, moved
pub fn set_show_display(&mut self, v: bool) {
self.show_display = ::std::option::Option::Some(v);
}
// optional bool chunkify = 4;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &NEMGetAddress| { &m.address_n },
|m: &mut NEMGetAddress| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"network",
|m: &NEMGetAddress| { &m.network },
|m: &mut NEMGetAddress| { &mut m.network },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"show_display",
|m: &NEMGetAddress| { &m.show_display },
|m: &mut NEMGetAddress| { &mut m.show_display },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &NEMGetAddress| { &m.chunkify },
|m: &mut NEMGetAddress| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMGetAddress>(
"NEMGetAddress",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMGetAddress {
const NAME: &'static str = "NEMGetAddress";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.network = ::std::option::Option::Some(is.read_uint32()?);
},
24 => {
self.show_display = ::std::option::Option::Some(is.read_bool()?);
},
32 => {
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.network {
my_size += ::protobuf::rt::uint32_size(2, v);
}
if let Some(v) = self.show_display {
my_size += 1 + 1;
}
if let Some(v) = self.chunkify {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.network {
os.write_uint32(2, v)?;
}
if let Some(v) = self.show_display {
os.write_bool(3, v)?;
}
if let Some(v) = self.chunkify {
os.write_bool(4, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NEMGetAddress {
NEMGetAddress::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.network = ::std::option::Option::None;
self.show_display = ::std::option::Option::None;
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMGetAddress {
static instance: NEMGetAddress = NEMGetAddress {
address_n: ::std::vec::Vec::new(),
network: ::std::option::Option::None,
show_display: ::std::option::Option::None,
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMGetAddress {
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("NEMGetAddress").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMGetAddress {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMGetAddress {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMAddress)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMAddress {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMAddress.address)
pub address: ::std::option::Option<::std::string::String>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMAddress.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMAddress {
fn default() -> &'a NEMAddress {
<NEMAddress as ::protobuf::Message>::default_instance()
}
}
impl NEMAddress {
pub fn new() -> NEMAddress {
::std::default::Default::default()
}
// required string address = 1;
pub fn address(&self) -> &str {
match self.address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_address(&mut self) {
self.address = ::std::option::Option::None;
}
pub fn has_address(&self) -> bool {
self.address.is_some()
}
// Param is passed by value, moved
pub fn set_address(&mut self, v: ::std::string::String) {
self.address = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_address(&mut self) -> &mut ::std::string::String {
if self.address.is_none() {
self.address = ::std::option::Option::Some(::std::string::String::new());
}
self.address.as_mut().unwrap()
}
// Take field
pub fn take_address(&mut self) -> ::std::string::String {
self.address.take().unwrap_or_else(|| ::std::string::String::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"address",
|m: &NEMAddress| { &m.address },
|m: &mut NEMAddress| { &mut m.address },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMAddress>(
"NEMAddress",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMAddress {
const NAME: &'static str = "NEMAddress";
fn is_initialized(&self) -> bool {
if self.address.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.address = ::std::option::Option::Some(is.read_string()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.address.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.address.as_ref() {
os.write_string(1, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NEMAddress {
NEMAddress::new()
}
fn clear(&mut self) {
self.address = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMAddress {
static instance: NEMAddress = NEMAddress {
address: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMAddress {
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("NEMAddress").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMAddress {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMAddress {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMSignTx {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.transaction)
pub transaction: ::protobuf::MessageField<nemsign_tx::NEMTransactionCommon>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.multisig)
pub multisig: ::protobuf::MessageField<nemsign_tx::NEMTransactionCommon>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.transfer)
pub transfer: ::protobuf::MessageField<nemsign_tx::NEMTransfer>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.cosigning)
pub cosigning: ::std::option::Option<bool>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.provision_namespace)
pub provision_namespace: ::protobuf::MessageField<nemsign_tx::NEMProvisionNamespace>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.mosaic_creation)
pub mosaic_creation: ::protobuf::MessageField<nemsign_tx::NEMMosaicCreation>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.supply_change)
pub supply_change: ::protobuf::MessageField<nemsign_tx::NEMMosaicSupplyChange>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.aggregate_modification)
pub aggregate_modification: ::protobuf::MessageField<nemsign_tx::NEMAggregateModification>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.importance_transfer)
pub importance_transfer: ::protobuf::MessageField<nemsign_tx::NEMImportanceTransfer>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.chunkify)
pub chunkify: ::std::option::Option<bool>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMSignTx {
fn default() -> &'a NEMSignTx {
<NEMSignTx as ::protobuf::Message>::default_instance()
}
}
impl NEMSignTx {
pub fn new() -> NEMSignTx {
::std::default::Default::default()
}
// optional bool cosigning = 4;
pub fn cosigning(&self) -> bool {
self.cosigning.unwrap_or(false)
}
pub fn clear_cosigning(&mut self) {
self.cosigning = ::std::option::Option::None;
}
pub fn has_cosigning(&self) -> bool {
self.cosigning.is_some()
}
// Param is passed by value, moved
pub fn set_cosigning(&mut self, v: bool) {
self.cosigning = ::std::option::Option::Some(v);
}
// optional bool chunkify = 10;
pub fn chunkify(&self) -> bool {
self.chunkify.unwrap_or(false)
}
pub fn clear_chunkify(&mut self) {
self.chunkify = ::std::option::Option::None;
}
pub fn has_chunkify(&self) -> bool {
self.chunkify.is_some()
}
// Param is passed by value, moved
pub fn set_chunkify(&mut self, v: bool) {
self.chunkify = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(10);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMTransactionCommon>(
"transaction",
|m: &NEMSignTx| { &m.transaction },
|m: &mut NEMSignTx| { &mut m.transaction },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMTransactionCommon>(
"multisig",
|m: &NEMSignTx| { &m.multisig },
|m: &mut NEMSignTx| { &mut m.multisig },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMTransfer>(
"transfer",
|m: &NEMSignTx| { &m.transfer },
|m: &mut NEMSignTx| { &mut m.transfer },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"cosigning",
|m: &NEMSignTx| { &m.cosigning },
|m: &mut NEMSignTx| { &mut m.cosigning },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMProvisionNamespace>(
"provision_namespace",
|m: &NEMSignTx| { &m.provision_namespace },
|m: &mut NEMSignTx| { &mut m.provision_namespace },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMMosaicCreation>(
"mosaic_creation",
|m: &NEMSignTx| { &m.mosaic_creation },
|m: &mut NEMSignTx| { &mut m.mosaic_creation },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMMosaicSupplyChange>(
"supply_change",
|m: &NEMSignTx| { &m.supply_change },
|m: &mut NEMSignTx| { &mut m.supply_change },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMAggregateModification>(
"aggregate_modification",
|m: &NEMSignTx| { &m.aggregate_modification },
|m: &mut NEMSignTx| { &mut m.aggregate_modification },
));
fields.push(::protobuf::reflect::rt::v2::make_message_field_accessor::<_, nemsign_tx::NEMImportanceTransfer>(
"importance_transfer",
|m: &NEMSignTx| { &m.importance_transfer },
|m: &mut NEMSignTx| { &mut m.importance_transfer },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"chunkify",
|m: &NEMSignTx| { &m.chunkify },
|m: &mut NEMSignTx| { &mut m.chunkify },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMSignTx>(
"NEMSignTx",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMSignTx {
const NAME: &'static str = "NEMSignTx";
fn is_initialized(&self) -> bool {
if self.transaction.is_none() {
return false;
}
for v in &self.transaction {
if !v.is_initialized() {
return false;
}
};
for v in &self.multisig {
if !v.is_initialized() {
return false;
}
};
for v in &self.transfer {
if !v.is_initialized() {
return false;
}
};
for v in &self.provision_namespace {
if !v.is_initialized() {
return false;
}
};
for v in &self.mosaic_creation {
if !v.is_initialized() {
return false;
}
};
for v in &self.supply_change {
if !v.is_initialized() {
return false;
}
};
for v in &self.aggregate_modification {
if !v.is_initialized() {
return false;
}
};
for v in &self.importance_transfer {
if !v.is_initialized() {
return false;
}
};
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.transaction)?;
},
18 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.multisig)?;
},
26 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.transfer)?;
},
32 => {
self.cosigning = ::std::option::Option::Some(is.read_bool()?);
},
42 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.provision_namespace)?;
},
50 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.mosaic_creation)?;
},
58 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.supply_change)?;
},
66 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.aggregate_modification)?;
},
74 => {
::protobuf::rt::read_singular_message_into_field(is, &mut self.importance_transfer)?;
},
80 => {
self.chunkify = ::std::option::Option::Some(is.read_bool()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.transaction.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.multisig.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.transfer.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.cosigning {
my_size += 1 + 1;
}
if let Some(v) = self.provision_namespace.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.mosaic_creation.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.supply_change.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.aggregate_modification.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.importance_transfer.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.chunkify {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.transaction.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if let Some(v) = self.multisig.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
}
if let Some(v) = self.transfer.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(3, v, os)?;
}
if let Some(v) = self.cosigning {
os.write_bool(4, v)?;
}
if let Some(v) = self.provision_namespace.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(5, v, os)?;
}
if let Some(v) = self.mosaic_creation.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(6, v, os)?;
}
if let Some(v) = self.supply_change.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(7, v, os)?;
}
if let Some(v) = self.aggregate_modification.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(8, v, os)?;
}
if let Some(v) = self.importance_transfer.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(9, v, os)?;
}
if let Some(v) = self.chunkify {
os.write_bool(10, 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() -> NEMSignTx {
NEMSignTx::new()
}
fn clear(&mut self) {
self.transaction.clear();
self.multisig.clear();
self.transfer.clear();
self.cosigning = ::std::option::Option::None;
self.provision_namespace.clear();
self.mosaic_creation.clear();
self.supply_change.clear();
self.aggregate_modification.clear();
self.importance_transfer.clear();
self.chunkify = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMSignTx {
static instance: NEMSignTx = NEMSignTx {
transaction: ::protobuf::MessageField::none(),
multisig: ::protobuf::MessageField::none(),
transfer: ::protobuf::MessageField::none(),
cosigning: ::std::option::Option::None,
provision_namespace: ::protobuf::MessageField::none(),
mosaic_creation: ::protobuf::MessageField::none(),
supply_change: ::protobuf::MessageField::none(),
aggregate_modification: ::protobuf::MessageField::none(),
importance_transfer: ::protobuf::MessageField::none(),
chunkify: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMSignTx {
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("NEMSignTx").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMSignTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMSignTx {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMSignTx`
pub mod nemsign_tx {
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMTransactionCommon {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.network)
pub network: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.timestamp)
pub timestamp: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.fee)
pub fee: ::std::option::Option<u64>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.deadline)
pub deadline: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.signer)
pub signer: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommon.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMTransactionCommon {
fn default() -> &'a NEMTransactionCommon {
<NEMTransactionCommon as ::protobuf::Message>::default_instance()
}
}
impl NEMTransactionCommon {
pub fn new() -> NEMTransactionCommon {
::std::default::Default::default()
}
// optional uint32 network = 2;
pub fn network(&self) -> u32 {
self.network.unwrap_or(104u32)
}
pub fn clear_network(&mut self) {
self.network = ::std::option::Option::None;
}
pub fn has_network(&self) -> bool {
self.network.is_some()
}
// Param is passed by value, moved
pub fn set_network(&mut self, v: u32) {
self.network = ::std::option::Option::Some(v);
}
// required uint32 timestamp = 3;
pub fn timestamp(&self) -> u32 {
self.timestamp.unwrap_or(0)
}
pub fn clear_timestamp(&mut self) {
self.timestamp = ::std::option::Option::None;
}
pub fn has_timestamp(&self) -> bool {
self.timestamp.is_some()
}
// Param is passed by value, moved
pub fn set_timestamp(&mut self, v: u32) {
self.timestamp = ::std::option::Option::Some(v);
}
// required uint64 fee = 4;
pub fn fee(&self) -> u64 {
self.fee.unwrap_or(0)
}
pub fn clear_fee(&mut self) {
self.fee = ::std::option::Option::None;
}
pub fn has_fee(&self) -> bool {
self.fee.is_some()
}
// Param is passed by value, moved
pub fn set_fee(&mut self, v: u64) {
self.fee = ::std::option::Option::Some(v);
}
// required uint32 deadline = 5;
pub fn deadline(&self) -> u32 {
self.deadline.unwrap_or(0)
}
pub fn clear_deadline(&mut self) {
self.deadline = ::std::option::Option::None;
}
pub fn has_deadline(&self) -> bool {
self.deadline.is_some()
}
// Param is passed by value, moved
pub fn set_deadline(&mut self, v: u32) {
self.deadline = ::std::option::Option::Some(v);
}
// optional bytes signer = 6;
pub fn signer(&self) -> &[u8] {
match self.signer.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signer(&mut self) {
self.signer = ::std::option::Option::None;
}
pub fn has_signer(&self) -> bool {
self.signer.is_some()
}
// Param is passed by value, moved
pub fn set_signer(&mut self, v: ::std::vec::Vec<u8>) {
self.signer = ::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_signer(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signer.is_none() {
self.signer = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signer.as_mut().unwrap()
}
// Take field
pub fn take_signer(&mut self) -> ::std::vec::Vec<u8> {
self.signer.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(6);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &NEMTransactionCommon| { &m.address_n },
|m: &mut NEMTransactionCommon| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"network",
|m: &NEMTransactionCommon| { &m.network },
|m: &mut NEMTransactionCommon| { &mut m.network },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"timestamp",
|m: &NEMTransactionCommon| { &m.timestamp },
|m: &mut NEMTransactionCommon| { &mut m.timestamp },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"fee",
|m: &NEMTransactionCommon| { &m.fee },
|m: &mut NEMTransactionCommon| { &mut m.fee },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"deadline",
|m: &NEMTransactionCommon| { &m.deadline },
|m: &mut NEMTransactionCommon| { &mut m.deadline },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signer",
|m: &NEMTransactionCommon| { &m.signer },
|m: &mut NEMTransactionCommon| { &mut m.signer },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMTransactionCommon>(
"NEMSignTx.NEMTransactionCommon",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMTransactionCommon {
const NAME: &'static str = "NEMTransactionCommon";
fn is_initialized(&self) -> bool {
if self.timestamp.is_none() {
return false;
}
if self.fee.is_none() {
return false;
}
if self.deadline.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.network = ::std::option::Option::Some(is.read_uint32()?);
},
24 => {
self.timestamp = ::std::option::Option::Some(is.read_uint32()?);
},
32 => {
self.fee = ::std::option::Option::Some(is.read_uint64()?);
},
40 => {
self.deadline = ::std::option::Option::Some(is.read_uint32()?);
},
50 => {
self.signer = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.network {
my_size += ::protobuf::rt::uint32_size(2, v);
}
if let Some(v) = self.timestamp {
my_size += ::protobuf::rt::uint32_size(3, v);
}
if let Some(v) = self.fee {
my_size += ::protobuf::rt::uint64_size(4, v);
}
if let Some(v) = self.deadline {
my_size += ::protobuf::rt::uint32_size(5, v);
}
if let Some(v) = self.signer.as_ref() {
my_size += ::protobuf::rt::bytes_size(6, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.network {
os.write_uint32(2, v)?;
}
if let Some(v) = self.timestamp {
os.write_uint32(3, v)?;
}
if let Some(v) = self.fee {
os.write_uint64(4, v)?;
}
if let Some(v) = self.deadline {
os.write_uint32(5, v)?;
}
if let Some(v) = self.signer.as_ref() {
os.write_bytes(6, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NEMTransactionCommon {
NEMTransactionCommon::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.network = ::std::option::Option::None;
self.timestamp = ::std::option::Option::None;
self.fee = ::std::option::Option::None;
self.deadline = ::std::option::Option::None;
self.signer = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMTransactionCommon {
static instance: NEMTransactionCommon = NEMTransactionCommon {
address_n: ::std::vec::Vec::new(),
network: ::std::option::Option::None,
timestamp: ::std::option::Option::None,
fee: ::std::option::Option::None,
deadline: ::std::option::Option::None,
signer: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMTransactionCommon {
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("NEMSignTx.NEMTransactionCommon").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMTransactionCommon {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMTransactionCommon {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMTransfer)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMTransfer {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.recipient)
pub recipient: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.amount)
pub amount: ::std::option::Option<u64>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.payload)
pub payload: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.public_key)
pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.mosaics)
pub mosaics: ::std::vec::Vec<nemtransfer::NEMMosaic>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMTransfer {
fn default() -> &'a NEMTransfer {
<NEMTransfer as ::protobuf::Message>::default_instance()
}
}
impl NEMTransfer {
pub fn new() -> NEMTransfer {
::std::default::Default::default()
}
// required string recipient = 1;
pub fn recipient(&self) -> &str {
match self.recipient.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_recipient(&mut self) {
self.recipient = ::std::option::Option::None;
}
pub fn has_recipient(&self) -> bool {
self.recipient.is_some()
}
// Param is passed by value, moved
pub fn set_recipient(&mut self, v: ::std::string::String) {
self.recipient = ::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_recipient(&mut self) -> &mut ::std::string::String {
if self.recipient.is_none() {
self.recipient = ::std::option::Option::Some(::std::string::String::new());
}
self.recipient.as_mut().unwrap()
}
// Take field
pub fn take_recipient(&mut self) -> ::std::string::String {
self.recipient.take().unwrap_or_else(|| ::std::string::String::new())
}
// required uint64 amount = 2;
pub fn amount(&self) -> u64 {
self.amount.unwrap_or(0)
}
pub fn clear_amount(&mut self) {
self.amount = ::std::option::Option::None;
}
pub fn has_amount(&self) -> bool {
self.amount.is_some()
}
// Param is passed by value, moved
pub fn set_amount(&mut self, v: u64) {
self.amount = ::std::option::Option::Some(v);
}
// optional bytes payload = 3;
pub fn payload(&self) -> &[u8] {
match self.payload.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_payload(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_payload(&self) -> bool {
self.payload.is_some()
}
// Param is passed by value, moved
pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
self.payload = ::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_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.payload.is_none() {
self.payload = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.payload.as_mut().unwrap()
}
// Take field
pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
self.payload.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes public_key = 4;
pub fn public_key(&self) -> &[u8] {
match self.public_key.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_public_key(&mut self) {
self.public_key = ::std::option::Option::None;
}
pub fn has_public_key(&self) -> bool {
self.public_key.is_some()
}
// Param is passed by value, moved
pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.public_key.is_none() {
self.public_key = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.public_key.as_mut().unwrap()
}
// Take field
pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(5);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"recipient",
|m: &NEMTransfer| { &m.recipient },
|m: &mut NEMTransfer| { &mut m.recipient },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"amount",
|m: &NEMTransfer| { &m.amount },
|m: &mut NEMTransfer| { &mut m.amount },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"payload",
|m: &NEMTransfer| { &m.payload },
|m: &mut NEMTransfer| { &mut m.payload },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"public_key",
|m: &NEMTransfer| { &m.public_key },
|m: &mut NEMTransfer| { &mut m.public_key },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"mosaics",
|m: &NEMTransfer| { &m.mosaics },
|m: &mut NEMTransfer| { &mut m.mosaics },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMTransfer>(
"NEMSignTx.NEMTransfer",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMTransfer {
const NAME: &'static str = "NEMTransfer";
fn is_initialized(&self) -> bool {
if self.recipient.is_none() {
return false;
}
if self.amount.is_none() {
return false;
}
for v in &self.mosaics {
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.recipient = ::std::option::Option::Some(is.read_string()?);
},
16 => {
self.amount = ::std::option::Option::Some(is.read_uint64()?);
},
26 => {
self.payload = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.public_key = ::std::option::Option::Some(is.read_bytes()?);
},
42 => {
self.mosaics.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;
if let Some(v) = self.recipient.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.amount {
my_size += ::protobuf::rt::uint64_size(2, v);
}
if let Some(v) = self.payload.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.public_key.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
for value in &self.mosaics {
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<()> {
if let Some(v) = self.recipient.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.amount {
os.write_uint64(2, v)?;
}
if let Some(v) = self.payload.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.public_key.as_ref() {
os.write_bytes(4, v)?;
}
for v in &self.mosaics {
::protobuf::rt::write_message_field_with_cached_size(5, 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() -> NEMTransfer {
NEMTransfer::new()
}
fn clear(&mut self) {
self.recipient = ::std::option::Option::None;
self.amount = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.public_key = ::std::option::Option::None;
self.mosaics.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static NEMTransfer {
static instance: NEMTransfer = NEMTransfer {
recipient: ::std::option::Option::None,
amount: ::std::option::Option::None,
payload: ::std::option::Option::None,
public_key: ::std::option::Option::None,
mosaics: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMTransfer {
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("NEMSignTx.NEMTransfer").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMTransfer {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMTransfer {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMTransfer`
pub mod nemtransfer {
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.NEMMosaic)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMMosaic {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.NEMMosaic.namespace)
pub namespace: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.NEMMosaic.mosaic)
pub mosaic: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.NEMMosaic.quantity)
pub quantity: ::std::option::Option<u64>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMTransfer.NEMMosaic.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMMosaic {
fn default() -> &'a NEMMosaic {
<NEMMosaic as ::protobuf::Message>::default_instance()
}
}
impl NEMMosaic {
pub fn new() -> NEMMosaic {
::std::default::Default::default()
}
// required string namespace = 1;
pub fn namespace(&self) -> &str {
match self.namespace.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_namespace(&mut self) {
self.namespace = ::std::option::Option::None;
}
pub fn has_namespace(&self) -> bool {
self.namespace.is_some()
}
// Param is passed by value, moved
pub fn set_namespace(&mut self, v: ::std::string::String) {
self.namespace = ::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_namespace(&mut self) -> &mut ::std::string::String {
if self.namespace.is_none() {
self.namespace = ::std::option::Option::Some(::std::string::String::new());
}
self.namespace.as_mut().unwrap()
}
// Take field
pub fn take_namespace(&mut self) -> ::std::string::String {
self.namespace.take().unwrap_or_else(|| ::std::string::String::new())
}
// required string mosaic = 2;
pub fn mosaic(&self) -> &str {
match self.mosaic.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_mosaic(&mut self) {
self.mosaic = ::std::option::Option::None;
}
pub fn has_mosaic(&self) -> bool {
self.mosaic.is_some()
}
// Param is passed by value, moved
pub fn set_mosaic(&mut self, v: ::std::string::String) {
self.mosaic = ::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_mosaic(&mut self) -> &mut ::std::string::String {
if self.mosaic.is_none() {
self.mosaic = ::std::option::Option::Some(::std::string::String::new());
}
self.mosaic.as_mut().unwrap()
}
// Take field
pub fn take_mosaic(&mut self) -> ::std::string::String {
self.mosaic.take().unwrap_or_else(|| ::std::string::String::new())
}
// required uint64 quantity = 3;
pub fn quantity(&self) -> u64 {
self.quantity.unwrap_or(0)
}
pub fn clear_quantity(&mut self) {
self.quantity = ::std::option::Option::None;
}
pub fn has_quantity(&self) -> bool {
self.quantity.is_some()
}
// Param is passed by value, moved
pub fn set_quantity(&mut self, v: u64) {
self.quantity = ::std::option::Option::Some(v);
}
pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(3);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"namespace",
|m: &NEMMosaic| { &m.namespace },
|m: &mut NEMMosaic| { &mut m.namespace },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mosaic",
|m: &NEMMosaic| { &m.mosaic },
|m: &mut NEMMosaic| { &mut m.mosaic },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"quantity",
|m: &NEMMosaic| { &m.quantity },
|m: &mut NEMMosaic| { &mut m.quantity },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMMosaic>(
"NEMSignTx.NEMTransfer.NEMMosaic",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMMosaic {
const NAME: &'static str = "NEMMosaic";
fn is_initialized(&self) -> bool {
if self.namespace.is_none() {
return false;
}
if self.mosaic.is_none() {
return false;
}
if self.quantity.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.namespace = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.mosaic = ::std::option::Option::Some(is.read_string()?);
},
24 => {
self.quantity = ::std::option::Option::Some(is.read_uint64()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.namespace.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.mosaic.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.quantity {
my_size += ::protobuf::rt::uint64_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.namespace.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.mosaic.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.quantity {
os.write_uint64(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() -> NEMMosaic {
NEMMosaic::new()
}
fn clear(&mut self) {
self.namespace = ::std::option::Option::None;
self.mosaic = ::std::option::Option::None;
self.quantity = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMMosaic {
static instance: NEMMosaic = NEMMosaic {
namespace: ::std::option::Option::None,
mosaic: ::std::option::Option::None,
quantity: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMMosaic {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("NEMSignTx.NEMTransfer.NEMMosaic").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMMosaic {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMMosaic {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMProvisionNamespace)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMProvisionNamespace {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMProvisionNamespace.namespace)
pub namespace: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMProvisionNamespace.parent)
pub parent: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMProvisionNamespace.sink)
pub sink: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMProvisionNamespace.fee)
pub fee: ::std::option::Option<u64>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMProvisionNamespace.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMProvisionNamespace {
fn default() -> &'a NEMProvisionNamespace {
<NEMProvisionNamespace as ::protobuf::Message>::default_instance()
}
}
impl NEMProvisionNamespace {
pub fn new() -> NEMProvisionNamespace {
::std::default::Default::default()
}
// required string namespace = 1;
pub fn namespace(&self) -> &str {
match self.namespace.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_namespace(&mut self) {
self.namespace = ::std::option::Option::None;
}
pub fn has_namespace(&self) -> bool {
self.namespace.is_some()
}
// Param is passed by value, moved
pub fn set_namespace(&mut self, v: ::std::string::String) {
self.namespace = ::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_namespace(&mut self) -> &mut ::std::string::String {
if self.namespace.is_none() {
self.namespace = ::std::option::Option::Some(::std::string::String::new());
}
self.namespace.as_mut().unwrap()
}
// Take field
pub fn take_namespace(&mut self) -> ::std::string::String {
self.namespace.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional string parent = 2;
pub fn parent(&self) -> &str {
match self.parent.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_parent(&mut self) {
self.parent = ::std::option::Option::None;
}
pub fn has_parent(&self) -> bool {
self.parent.is_some()
}
// Param is passed by value, moved
pub fn set_parent(&mut self, v: ::std::string::String) {
self.parent = ::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_parent(&mut self) -> &mut ::std::string::String {
if self.parent.is_none() {
self.parent = ::std::option::Option::Some(::std::string::String::new());
}
self.parent.as_mut().unwrap()
}
// Take field
pub fn take_parent(&mut self) -> ::std::string::String {
self.parent.take().unwrap_or_else(|| ::std::string::String::new())
}
// required string sink = 3;
pub fn sink(&self) -> &str {
match self.sink.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_sink(&mut self) {
self.sink = ::std::option::Option::None;
}
pub fn has_sink(&self) -> bool {
self.sink.is_some()
}
// Param is passed by value, moved
pub fn set_sink(&mut self, v: ::std::string::String) {
self.sink = ::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_sink(&mut self) -> &mut ::std::string::String {
if self.sink.is_none() {
self.sink = ::std::option::Option::Some(::std::string::String::new());
}
self.sink.as_mut().unwrap()
}
// Take field
pub fn take_sink(&mut self) -> ::std::string::String {
self.sink.take().unwrap_or_else(|| ::std::string::String::new())
}
// required uint64 fee = 4;
pub fn fee(&self) -> u64 {
self.fee.unwrap_or(0)
}
pub fn clear_fee(&mut self) {
self.fee = ::std::option::Option::None;
}
pub fn has_fee(&self) -> bool {
self.fee.is_some()
}
// Param is passed by value, moved
pub fn set_fee(&mut self, v: u64) {
self.fee = ::std::option::Option::Some(v);
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"namespace",
|m: &NEMProvisionNamespace| { &m.namespace },
|m: &mut NEMProvisionNamespace| { &mut m.namespace },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"parent",
|m: &NEMProvisionNamespace| { &m.parent },
|m: &mut NEMProvisionNamespace| { &mut m.parent },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"sink",
|m: &NEMProvisionNamespace| { &m.sink },
|m: &mut NEMProvisionNamespace| { &mut m.sink },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"fee",
|m: &NEMProvisionNamespace| { &m.fee },
|m: &mut NEMProvisionNamespace| { &mut m.fee },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMProvisionNamespace>(
"NEMSignTx.NEMProvisionNamespace",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMProvisionNamespace {
const NAME: &'static str = "NEMProvisionNamespace";
fn is_initialized(&self) -> bool {
if self.namespace.is_none() {
return false;
}
if self.sink.is_none() {
return false;
}
if self.fee.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.namespace = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.parent = ::std::option::Option::Some(is.read_string()?);
},
26 => {
self.sink = ::std::option::Option::Some(is.read_string()?);
},
32 => {
self.fee = ::std::option::Option::Some(is.read_uint64()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.namespace.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.parent.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.sink.as_ref() {
my_size += ::protobuf::rt::string_size(3, &v);
}
if let Some(v) = self.fee {
my_size += ::protobuf::rt::uint64_size(4, v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.namespace.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.parent.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.sink.as_ref() {
os.write_string(3, v)?;
}
if let Some(v) = self.fee {
os.write_uint64(4, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NEMProvisionNamespace {
NEMProvisionNamespace::new()
}
fn clear(&mut self) {
self.namespace = ::std::option::Option::None;
self.parent = ::std::option::Option::None;
self.sink = ::std::option::Option::None;
self.fee = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMProvisionNamespace {
static instance: NEMProvisionNamespace = NEMProvisionNamespace {
namespace: ::std::option::Option::None,
parent: ::std::option::Option::None,
sink: ::std::option::Option::None,
fee: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMProvisionNamespace {
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("NEMSignTx.NEMProvisionNamespace").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMProvisionNamespace {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMProvisionNamespace {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMMosaicCreation {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.definition)
pub definition: ::protobuf::MessageField<nemmosaic_creation::NEMMosaicDefinition>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.sink)
pub sink: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.fee)
pub fee: ::std::option::Option<u64>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMMosaicCreation {
fn default() -> &'a NEMMosaicCreation {
<NEMMosaicCreation as ::protobuf::Message>::default_instance()
}
}
impl NEMMosaicCreation {
pub fn new() -> NEMMosaicCreation {
::std::default::Default::default()
}
// required string sink = 2;
pub fn sink(&self) -> &str {
match self.sink.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_sink(&mut self) {
self.sink = ::std::option::Option::None;
}
pub fn has_sink(&self) -> bool {
self.sink.is_some()
}
// Param is passed by value, moved
pub fn set_sink(&mut self, v: ::std::string::String) {
self.sink = ::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_sink(&mut self) -> &mut ::std::string::String {
if self.sink.is_none() {
self.sink = ::std::option::Option::Some(::std::string::String::new());
}
self.sink.as_mut().unwrap()
}
// Take field
pub fn take_sink(&mut self) -> ::std::string::String {
self.sink.take().unwrap_or_else(|| ::std::string::String::new())
}
// required uint64 fee = 3;
pub fn fee(&self) -> u64 {
self.fee.unwrap_or(0)
}
pub fn clear_fee(&mut self) {
self.fee = ::std::option::Option::None;
}
pub fn has_fee(&self) -> bool {
self.fee.is_some()
}
// Param is passed by value, moved
pub fn set_fee(&mut self, v: u64) {
self.fee = ::std::option::Option::Some(v);
}
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_message_field_accessor::<_, nemmosaic_creation::NEMMosaicDefinition>(
"definition",
|m: &NEMMosaicCreation| { &m.definition },
|m: &mut NEMMosaicCreation| { &mut m.definition },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"sink",
|m: &NEMMosaicCreation| { &m.sink },
|m: &mut NEMMosaicCreation| { &mut m.sink },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"fee",
|m: &NEMMosaicCreation| { &m.fee },
|m: &mut NEMMosaicCreation| { &mut m.fee },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMMosaicCreation>(
"NEMSignTx.NEMMosaicCreation",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMMosaicCreation {
const NAME: &'static str = "NEMMosaicCreation";
fn is_initialized(&self) -> bool {
if self.definition.is_none() {
return false;
}
if self.sink.is_none() {
return false;
}
if self.fee.is_none() {
return false;
}
for v in &self.definition {
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.definition)?;
},
18 => {
self.sink = ::std::option::Option::Some(is.read_string()?);
},
24 => {
self.fee = ::std::option::Option::Some(is.read_uint64()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.definition.as_ref() {
let len = v.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
}
if let Some(v) = self.sink.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.fee {
my_size += ::protobuf::rt::uint64_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.definition.as_ref() {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
}
if let Some(v) = self.sink.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.fee {
os.write_uint64(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() -> NEMMosaicCreation {
NEMMosaicCreation::new()
}
fn clear(&mut self) {
self.definition.clear();
self.sink = ::std::option::Option::None;
self.fee = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMMosaicCreation {
static instance: NEMMosaicCreation = NEMMosaicCreation {
definition: ::protobuf::MessageField::none(),
sink: ::std::option::Option::None,
fee: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMMosaicCreation {
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("NEMSignTx.NEMMosaicCreation").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMMosaicCreation {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMMosaicCreation {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMMosaicCreation`
pub mod nemmosaic_creation {
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMMosaicDefinition {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.name)
pub name: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.ticker)
pub ticker: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.namespace)
pub namespace: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.mosaic)
pub mosaic: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.divisibility)
pub divisibility: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.levy)
pub levy: ::std::option::Option<::protobuf::EnumOrUnknown<nemmosaic_definition::NEMMosaicLevy>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.fee)
pub fee: ::std::option::Option<u64>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.levy_address)
pub levy_address: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.levy_namespace)
pub levy_namespace: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.levy_mosaic)
pub levy_mosaic: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.supply)
pub supply: ::std::option::Option<u64>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.mutable_supply)
pub mutable_supply: ::std::option::Option<bool>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.transferable)
pub transferable: ::std::option::Option<bool>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.description)
pub description: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.networks)
pub networks: ::std::vec::Vec<u32>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMMosaicDefinition {
fn default() -> &'a NEMMosaicDefinition {
<NEMMosaicDefinition as ::protobuf::Message>::default_instance()
}
}
impl NEMMosaicDefinition {
pub fn new() -> NEMMosaicDefinition {
::std::default::Default::default()
}
// optional string name = 1;
pub fn name(&self) -> &str {
match self.name.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_name(&mut self) {
self.name = ::std::option::Option::None;
}
pub fn has_name(&self) -> bool {
self.name.is_some()
}
// Param is passed by value, moved
pub fn set_name(&mut self, v: ::std::string::String) {
self.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_name(&mut self) -> &mut ::std::string::String {
if self.name.is_none() {
self.name = ::std::option::Option::Some(::std::string::String::new());
}
self.name.as_mut().unwrap()
}
// Take field
pub fn take_name(&mut self) -> ::std::string::String {
self.name.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional string ticker = 2;
pub fn ticker(&self) -> &str {
match self.ticker.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_ticker(&mut self) {
self.ticker = ::std::option::Option::None;
}
pub fn has_ticker(&self) -> bool {
self.ticker.is_some()
}
// Param is passed by value, moved
pub fn set_ticker(&mut self, v: ::std::string::String) {
self.ticker = ::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_ticker(&mut self) -> &mut ::std::string::String {
if self.ticker.is_none() {
self.ticker = ::std::option::Option::Some(::std::string::String::new());
}
self.ticker.as_mut().unwrap()
}
// Take field
pub fn take_ticker(&mut self) -> ::std::string::String {
self.ticker.take().unwrap_or_else(|| ::std::string::String::new())
}
// required string namespace = 3;
pub fn namespace(&self) -> &str {
match self.namespace.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_namespace(&mut self) {
self.namespace = ::std::option::Option::None;
}
pub fn has_namespace(&self) -> bool {
self.namespace.is_some()
}
// Param is passed by value, moved
pub fn set_namespace(&mut self, v: ::std::string::String) {
self.namespace = ::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_namespace(&mut self) -> &mut ::std::string::String {
if self.namespace.is_none() {
self.namespace = ::std::option::Option::Some(::std::string::String::new());
}
self.namespace.as_mut().unwrap()
}
// Take field
pub fn take_namespace(&mut self) -> ::std::string::String {
self.namespace.take().unwrap_or_else(|| ::std::string::String::new())
}
// required string mosaic = 4;
pub fn mosaic(&self) -> &str {
match self.mosaic.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_mosaic(&mut self) {
self.mosaic = ::std::option::Option::None;
}
pub fn has_mosaic(&self) -> bool {
self.mosaic.is_some()
}
// Param is passed by value, moved
pub fn set_mosaic(&mut self, v: ::std::string::String) {
self.mosaic = ::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_mosaic(&mut self) -> &mut ::std::string::String {
if self.mosaic.is_none() {
self.mosaic = ::std::option::Option::Some(::std::string::String::new());
}
self.mosaic.as_mut().unwrap()
}
// Take field
pub fn take_mosaic(&mut self) -> ::std::string::String {
self.mosaic.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional uint32 divisibility = 5;
pub fn divisibility(&self) -> u32 {
self.divisibility.unwrap_or(0)
}
pub fn clear_divisibility(&mut self) {
self.divisibility = ::std::option::Option::None;
}
pub fn has_divisibility(&self) -> bool {
self.divisibility.is_some()
}
// Param is passed by value, moved
pub fn set_divisibility(&mut self, v: u32) {
self.divisibility = ::std::option::Option::Some(v);
}
// optional .hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.NEMMosaicLevy levy = 6;
pub fn levy(&self) -> nemmosaic_definition::NEMMosaicLevy {
match self.levy {
Some(e) => e.enum_value_or(nemmosaic_definition::NEMMosaicLevy::MosaicLevy_Absolute),
None => nemmosaic_definition::NEMMosaicLevy::MosaicLevy_Absolute,
}
}
pub fn clear_levy(&mut self) {
self.levy = ::std::option::Option::None;
}
pub fn has_levy(&self) -> bool {
self.levy.is_some()
}
// Param is passed by value, moved
pub fn set_levy(&mut self, v: nemmosaic_definition::NEMMosaicLevy) {
self.levy = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
// optional uint64 fee = 7;
pub fn fee(&self) -> u64 {
self.fee.unwrap_or(0)
}
pub fn clear_fee(&mut self) {
self.fee = ::std::option::Option::None;
}
pub fn has_fee(&self) -> bool {
self.fee.is_some()
}
// Param is passed by value, moved
pub fn set_fee(&mut self, v: u64) {
self.fee = ::std::option::Option::Some(v);
}
// optional string levy_address = 8;
pub fn levy_address(&self) -> &str {
match self.levy_address.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_levy_address(&mut self) {
self.levy_address = ::std::option::Option::None;
}
pub fn has_levy_address(&self) -> bool {
self.levy_address.is_some()
}
// Param is passed by value, moved
pub fn set_levy_address(&mut self, v: ::std::string::String) {
self.levy_address = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_levy_address(&mut self) -> &mut ::std::string::String {
if self.levy_address.is_none() {
self.levy_address = ::std::option::Option::Some(::std::string::String::new());
}
self.levy_address.as_mut().unwrap()
}
// Take field
pub fn take_levy_address(&mut self) -> ::std::string::String {
self.levy_address.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional string levy_namespace = 9;
pub fn levy_namespace(&self) -> &str {
match self.levy_namespace.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_levy_namespace(&mut self) {
self.levy_namespace = ::std::option::Option::None;
}
pub fn has_levy_namespace(&self) -> bool {
self.levy_namespace.is_some()
}
// Param is passed by value, moved
pub fn set_levy_namespace(&mut self, v: ::std::string::String) {
self.levy_namespace = ::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_levy_namespace(&mut self) -> &mut ::std::string::String {
if self.levy_namespace.is_none() {
self.levy_namespace = ::std::option::Option::Some(::std::string::String::new());
}
self.levy_namespace.as_mut().unwrap()
}
// Take field
pub fn take_levy_namespace(&mut self) -> ::std::string::String {
self.levy_namespace.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional string levy_mosaic = 10;
pub fn levy_mosaic(&self) -> &str {
match self.levy_mosaic.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_levy_mosaic(&mut self) {
self.levy_mosaic = ::std::option::Option::None;
}
pub fn has_levy_mosaic(&self) -> bool {
self.levy_mosaic.is_some()
}
// Param is passed by value, moved
pub fn set_levy_mosaic(&mut self, v: ::std::string::String) {
self.levy_mosaic = ::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_levy_mosaic(&mut self) -> &mut ::std::string::String {
if self.levy_mosaic.is_none() {
self.levy_mosaic = ::std::option::Option::Some(::std::string::String::new());
}
self.levy_mosaic.as_mut().unwrap()
}
// Take field
pub fn take_levy_mosaic(&mut self) -> ::std::string::String {
self.levy_mosaic.take().unwrap_or_else(|| ::std::string::String::new())
}
// optional uint64 supply = 11;
pub fn supply(&self) -> u64 {
self.supply.unwrap_or(0)
}
pub fn clear_supply(&mut self) {
self.supply = ::std::option::Option::None;
}
pub fn has_supply(&self) -> bool {
self.supply.is_some()
}
// Param is passed by value, moved
pub fn set_supply(&mut self, v: u64) {
self.supply = ::std::option::Option::Some(v);
}
// optional bool mutable_supply = 12;
pub fn mutable_supply(&self) -> bool {
self.mutable_supply.unwrap_or(false)
}
pub fn clear_mutable_supply(&mut self) {
self.mutable_supply = ::std::option::Option::None;
}
pub fn has_mutable_supply(&self) -> bool {
self.mutable_supply.is_some()
}
// Param is passed by value, moved
pub fn set_mutable_supply(&mut self, v: bool) {
self.mutable_supply = ::std::option::Option::Some(v);
}
// optional bool transferable = 13;
pub fn transferable(&self) -> bool {
self.transferable.unwrap_or(false)
}
pub fn clear_transferable(&mut self) {
self.transferable = ::std::option::Option::None;
}
pub fn has_transferable(&self) -> bool {
self.transferable.is_some()
}
// Param is passed by value, moved
pub fn set_transferable(&mut self, v: bool) {
self.transferable = ::std::option::Option::Some(v);
}
// required string description = 14;
pub fn description(&self) -> &str {
match self.description.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_description(&mut self) {
self.description = ::std::option::Option::None;
}
pub fn has_description(&self) -> bool {
self.description.is_some()
}
// Param is passed by value, moved
pub fn set_description(&mut self, v: ::std::string::String) {
self.description = ::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_description(&mut self) -> &mut ::std::string::String {
if self.description.is_none() {
self.description = ::std::option::Option::Some(::std::string::String::new());
}
self.description.as_mut().unwrap()
}
// Take field
pub fn take_description(&mut self) -> ::std::string::String {
self.description.take().unwrap_or_else(|| ::std::string::String::new())
}
pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(15);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"name",
|m: &NEMMosaicDefinition| { &m.name },
|m: &mut NEMMosaicDefinition| { &mut m.name },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"ticker",
|m: &NEMMosaicDefinition| { &m.ticker },
|m: &mut NEMMosaicDefinition| { &mut m.ticker },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"namespace",
|m: &NEMMosaicDefinition| { &m.namespace },
|m: &mut NEMMosaicDefinition| { &mut m.namespace },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mosaic",
|m: &NEMMosaicDefinition| { &m.mosaic },
|m: &mut NEMMosaicDefinition| { &mut m.mosaic },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"divisibility",
|m: &NEMMosaicDefinition| { &m.divisibility },
|m: &mut NEMMosaicDefinition| { &mut m.divisibility },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"levy",
|m: &NEMMosaicDefinition| { &m.levy },
|m: &mut NEMMosaicDefinition| { &mut m.levy },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"fee",
|m: &NEMMosaicDefinition| { &m.fee },
|m: &mut NEMMosaicDefinition| { &mut m.fee },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"levy_address",
|m: &NEMMosaicDefinition| { &m.levy_address },
|m: &mut NEMMosaicDefinition| { &mut m.levy_address },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"levy_namespace",
|m: &NEMMosaicDefinition| { &m.levy_namespace },
|m: &mut NEMMosaicDefinition| { &mut m.levy_namespace },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"levy_mosaic",
|m: &NEMMosaicDefinition| { &m.levy_mosaic },
|m: &mut NEMMosaicDefinition| { &mut m.levy_mosaic },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"supply",
|m: &NEMMosaicDefinition| { &m.supply },
|m: &mut NEMMosaicDefinition| { &mut m.supply },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mutable_supply",
|m: &NEMMosaicDefinition| { &m.mutable_supply },
|m: &mut NEMMosaicDefinition| { &mut m.mutable_supply },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"transferable",
|m: &NEMMosaicDefinition| { &m.transferable },
|m: &mut NEMMosaicDefinition| { &mut m.transferable },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"description",
|m: &NEMMosaicDefinition| { &m.description },
|m: &mut NEMMosaicDefinition| { &mut m.description },
));
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"networks",
|m: &NEMMosaicDefinition| { &m.networks },
|m: &mut NEMMosaicDefinition| { &mut m.networks },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMMosaicDefinition>(
"NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMMosaicDefinition {
const NAME: &'static str = "NEMMosaicDefinition";
fn is_initialized(&self) -> bool {
if self.namespace.is_none() {
return false;
}
if self.mosaic.is_none() {
return false;
}
if self.description.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.name = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.ticker = ::std::option::Option::Some(is.read_string()?);
},
26 => {
self.namespace = ::std::option::Option::Some(is.read_string()?);
},
34 => {
self.mosaic = ::std::option::Option::Some(is.read_string()?);
},
40 => {
self.divisibility = ::std::option::Option::Some(is.read_uint32()?);
},
48 => {
self.levy = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
56 => {
self.fee = ::std::option::Option::Some(is.read_uint64()?);
},
66 => {
self.levy_address = ::std::option::Option::Some(is.read_string()?);
},
74 => {
self.levy_namespace = ::std::option::Option::Some(is.read_string()?);
},
82 => {
self.levy_mosaic = ::std::option::Option::Some(is.read_string()?);
},
88 => {
self.supply = ::std::option::Option::Some(is.read_uint64()?);
},
96 => {
self.mutable_supply = ::std::option::Option::Some(is.read_bool()?);
},
104 => {
self.transferable = ::std::option::Option::Some(is.read_bool()?);
},
114 => {
self.description = ::std::option::Option::Some(is.read_string()?);
},
122 => {
is.read_repeated_packed_uint32_into(&mut self.networks)?;
},
120 => {
self.networks.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;
if let Some(v) = self.name.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.ticker.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.namespace.as_ref() {
my_size += ::protobuf::rt::string_size(3, &v);
}
if let Some(v) = self.mosaic.as_ref() {
my_size += ::protobuf::rt::string_size(4, &v);
}
if let Some(v) = self.divisibility {
my_size += ::protobuf::rt::uint32_size(5, v);
}
if let Some(v) = self.levy {
my_size += ::protobuf::rt::int32_size(6, v.value());
}
if let Some(v) = self.fee {
my_size += ::protobuf::rt::uint64_size(7, v);
}
if let Some(v) = self.levy_address.as_ref() {
my_size += ::protobuf::rt::string_size(8, &v);
}
if let Some(v) = self.levy_namespace.as_ref() {
my_size += ::protobuf::rt::string_size(9, &v);
}
if let Some(v) = self.levy_mosaic.as_ref() {
my_size += ::protobuf::rt::string_size(10, &v);
}
if let Some(v) = self.supply {
my_size += ::protobuf::rt::uint64_size(11, v);
}
if let Some(v) = self.mutable_supply {
my_size += 1 + 1;
}
if let Some(v) = self.transferable {
my_size += 1 + 1;
}
if let Some(v) = self.description.as_ref() {
my_size += ::protobuf::rt::string_size(14, &v);
}
for value in &self.networks {
my_size += ::protobuf::rt::uint32_size(15, *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.name.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.ticker.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.namespace.as_ref() {
os.write_string(3, v)?;
}
if let Some(v) = self.mosaic.as_ref() {
os.write_string(4, v)?;
}
if let Some(v) = self.divisibility {
os.write_uint32(5, v)?;
}
if let Some(v) = self.levy {
os.write_enum(6, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.fee {
os.write_uint64(7, v)?;
}
if let Some(v) = self.levy_address.as_ref() {
os.write_string(8, v)?;
}
if let Some(v) = self.levy_namespace.as_ref() {
os.write_string(9, v)?;
}
if let Some(v) = self.levy_mosaic.as_ref() {
os.write_string(10, v)?;
}
if let Some(v) = self.supply {
os.write_uint64(11, v)?;
}
if let Some(v) = self.mutable_supply {
os.write_bool(12, v)?;
}
if let Some(v) = self.transferable {
os.write_bool(13, v)?;
}
if let Some(v) = self.description.as_ref() {
os.write_string(14, v)?;
}
for v in &self.networks {
os.write_uint32(15, *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() -> NEMMosaicDefinition {
NEMMosaicDefinition::new()
}
fn clear(&mut self) {
self.name = ::std::option::Option::None;
self.ticker = ::std::option::Option::None;
self.namespace = ::std::option::Option::None;
self.mosaic = ::std::option::Option::None;
self.divisibility = ::std::option::Option::None;
self.levy = ::std::option::Option::None;
self.fee = ::std::option::Option::None;
self.levy_address = ::std::option::Option::None;
self.levy_namespace = ::std::option::Option::None;
self.levy_mosaic = ::std::option::Option::None;
self.supply = ::std::option::Option::None;
self.mutable_supply = ::std::option::Option::None;
self.transferable = ::std::option::Option::None;
self.description = ::std::option::Option::None;
self.networks.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static NEMMosaicDefinition {
static instance: NEMMosaicDefinition = NEMMosaicDefinition {
name: ::std::option::Option::None,
ticker: ::std::option::Option::None,
namespace: ::std::option::Option::None,
mosaic: ::std::option::Option::None,
divisibility: ::std::option::Option::None,
levy: ::std::option::Option::None,
fee: ::std::option::Option::None,
levy_address: ::std::option::Option::None,
levy_namespace: ::std::option::Option::None,
levy_mosaic: ::std::option::Option::None,
supply: ::std::option::Option::None,
mutable_supply: ::std::option::Option::None,
transferable: ::std::option::Option::None,
description: ::std::option::Option::None,
networks: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMMosaicDefinition {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMMosaicDefinition {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMMosaicDefinition {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMMosaicDefinition`
pub mod nemmosaic_definition {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.NEMMosaicLevy)
pub enum NEMMosaicLevy {
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.NEMMosaicLevy.MosaicLevy_Absolute)
MosaicLevy_Absolute = 1,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.NEMMosaicLevy.MosaicLevy_Percentile)
MosaicLevy_Percentile = 2,
}
impl ::protobuf::Enum for NEMMosaicLevy {
const NAME: &'static str = "NEMMosaicLevy";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NEMMosaicLevy> {
match value {
1 => ::std::option::Option::Some(NEMMosaicLevy::MosaicLevy_Absolute),
2 => ::std::option::Option::Some(NEMMosaicLevy::MosaicLevy_Percentile),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<NEMMosaicLevy> {
match str {
"MosaicLevy_Absolute" => ::std::option::Option::Some(NEMMosaicLevy::MosaicLevy_Absolute),
"MosaicLevy_Percentile" => ::std::option::Option::Some(NEMMosaicLevy::MosaicLevy_Percentile),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [NEMMosaicLevy] = &[
NEMMosaicLevy::MosaicLevy_Absolute,
NEMMosaicLevy::MosaicLevy_Percentile,
];
}
impl ::protobuf::EnumFull for NEMMosaicLevy {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::super::file_descriptor().enum_by_package_relative_name("NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.NEMMosaicLevy").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
NEMMosaicLevy::MosaicLevy_Absolute => 0,
NEMMosaicLevy::MosaicLevy_Percentile => 1,
};
Self::enum_descriptor().value_by_index(index)
}
}
// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for NEMMosaicLevy {
fn default() -> Self {
NEMMosaicLevy::MosaicLevy_Absolute
}
}
impl NEMMosaicLevy {
pub(in super::super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<NEMMosaicLevy>("NEMSignTx.NEMMosaicCreation.NEMMosaicDefinition.NEMMosaicLevy")
}
}
}
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMMosaicSupplyChange {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.namespace)
pub namespace: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.mosaic)
pub mosaic: ::std::option::Option<::std::string::String>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.type)
pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<nemmosaic_supply_change::NEMSupplyChangeType>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.delta)
pub delta: ::std::option::Option<u64>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMMosaicSupplyChange {
fn default() -> &'a NEMMosaicSupplyChange {
<NEMMosaicSupplyChange as ::protobuf::Message>::default_instance()
}
}
impl NEMMosaicSupplyChange {
pub fn new() -> NEMMosaicSupplyChange {
::std::default::Default::default()
}
// required string namespace = 1;
pub fn namespace(&self) -> &str {
match self.namespace.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_namespace(&mut self) {
self.namespace = ::std::option::Option::None;
}
pub fn has_namespace(&self) -> bool {
self.namespace.is_some()
}
// Param is passed by value, moved
pub fn set_namespace(&mut self, v: ::std::string::String) {
self.namespace = ::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_namespace(&mut self) -> &mut ::std::string::String {
if self.namespace.is_none() {
self.namespace = ::std::option::Option::Some(::std::string::String::new());
}
self.namespace.as_mut().unwrap()
}
// Take field
pub fn take_namespace(&mut self) -> ::std::string::String {
self.namespace.take().unwrap_or_else(|| ::std::string::String::new())
}
// required string mosaic = 2;
pub fn mosaic(&self) -> &str {
match self.mosaic.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_mosaic(&mut self) {
self.mosaic = ::std::option::Option::None;
}
pub fn has_mosaic(&self) -> bool {
self.mosaic.is_some()
}
// Param is passed by value, moved
pub fn set_mosaic(&mut self, v: ::std::string::String) {
self.mosaic = ::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_mosaic(&mut self) -> &mut ::std::string::String {
if self.mosaic.is_none() {
self.mosaic = ::std::option::Option::Some(::std::string::String::new());
}
self.mosaic.as_mut().unwrap()
}
// Take field
pub fn take_mosaic(&mut self) -> ::std::string::String {
self.mosaic.take().unwrap_or_else(|| ::std::string::String::new())
}
// required .hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeType type = 3;
pub fn type_(&self) -> nemmosaic_supply_change::NEMSupplyChangeType {
match self.type_ {
Some(e) => e.enum_value_or(nemmosaic_supply_change::NEMSupplyChangeType::SupplyChange_Increase),
None => nemmosaic_supply_change::NEMSupplyChangeType::SupplyChange_Increase,
}
}
pub fn clear_type_(&mut self) {
self.type_ = ::std::option::Option::None;
}
pub fn has_type(&self) -> bool {
self.type_.is_some()
}
// Param is passed by value, moved
pub fn set_type(&mut self, v: nemmosaic_supply_change::NEMSupplyChangeType) {
self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
// required uint64 delta = 4;
pub fn delta(&self) -> u64 {
self.delta.unwrap_or(0)
}
pub fn clear_delta(&mut self) {
self.delta = ::std::option::Option::None;
}
pub fn has_delta(&self) -> bool {
self.delta.is_some()
}
// Param is passed by value, moved
pub fn set_delta(&mut self, v: u64) {
self.delta = ::std::option::Option::Some(v);
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"namespace",
|m: &NEMMosaicSupplyChange| { &m.namespace },
|m: &mut NEMMosaicSupplyChange| { &mut m.namespace },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mosaic",
|m: &NEMMosaicSupplyChange| { &m.mosaic },
|m: &mut NEMMosaicSupplyChange| { &mut m.mosaic },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"type",
|m: &NEMMosaicSupplyChange| { &m.type_ },
|m: &mut NEMMosaicSupplyChange| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"delta",
|m: &NEMMosaicSupplyChange| { &m.delta },
|m: &mut NEMMosaicSupplyChange| { &mut m.delta },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMMosaicSupplyChange>(
"NEMSignTx.NEMMosaicSupplyChange",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMMosaicSupplyChange {
const NAME: &'static str = "NEMMosaicSupplyChange";
fn is_initialized(&self) -> bool {
if self.namespace.is_none() {
return false;
}
if self.mosaic.is_none() {
return false;
}
if self.type_.is_none() {
return false;
}
if self.delta.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.namespace = ::std::option::Option::Some(is.read_string()?);
},
18 => {
self.mosaic = ::std::option::Option::Some(is.read_string()?);
},
24 => {
self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
32 => {
self.delta = ::std::option::Option::Some(is.read_uint64()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.namespace.as_ref() {
my_size += ::protobuf::rt::string_size(1, &v);
}
if let Some(v) = self.mosaic.as_ref() {
my_size += ::protobuf::rt::string_size(2, &v);
}
if let Some(v) = self.type_ {
my_size += ::protobuf::rt::int32_size(3, v.value());
}
if let Some(v) = self.delta {
my_size += ::protobuf::rt::uint64_size(4, v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if let Some(v) = self.namespace.as_ref() {
os.write_string(1, v)?;
}
if let Some(v) = self.mosaic.as_ref() {
os.write_string(2, v)?;
}
if let Some(v) = self.type_ {
os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.delta {
os.write_uint64(4, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NEMMosaicSupplyChange {
NEMMosaicSupplyChange::new()
}
fn clear(&mut self) {
self.namespace = ::std::option::Option::None;
self.mosaic = ::std::option::Option::None;
self.type_ = ::std::option::Option::None;
self.delta = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMMosaicSupplyChange {
static instance: NEMMosaicSupplyChange = NEMMosaicSupplyChange {
namespace: ::std::option::Option::None,
mosaic: ::std::option::Option::None,
type_: ::std::option::Option::None,
delta: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMMosaicSupplyChange {
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("NEMSignTx.NEMMosaicSupplyChange").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMMosaicSupplyChange {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMMosaicSupplyChange {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMMosaicSupplyChange`
pub mod nemmosaic_supply_change {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeType)
pub enum NEMSupplyChangeType {
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeType.SupplyChange_Increase)
SupplyChange_Increase = 1,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeType.SupplyChange_Decrease)
SupplyChange_Decrease = 2,
}
impl ::protobuf::Enum for NEMSupplyChangeType {
const NAME: &'static str = "NEMSupplyChangeType";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NEMSupplyChangeType> {
match value {
1 => ::std::option::Option::Some(NEMSupplyChangeType::SupplyChange_Increase),
2 => ::std::option::Option::Some(NEMSupplyChangeType::SupplyChange_Decrease),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<NEMSupplyChangeType> {
match str {
"SupplyChange_Increase" => ::std::option::Option::Some(NEMSupplyChangeType::SupplyChange_Increase),
"SupplyChange_Decrease" => ::std::option::Option::Some(NEMSupplyChangeType::SupplyChange_Decrease),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [NEMSupplyChangeType] = &[
NEMSupplyChangeType::SupplyChange_Increase,
NEMSupplyChangeType::SupplyChange_Decrease,
];
}
impl ::protobuf::EnumFull for NEMSupplyChangeType {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::file_descriptor().enum_by_package_relative_name("NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeType").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
NEMSupplyChangeType::SupplyChange_Increase => 0,
NEMSupplyChangeType::SupplyChange_Decrease => 1,
};
Self::enum_descriptor().value_by_index(index)
}
}
// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for NEMSupplyChangeType {
fn default() -> Self {
NEMSupplyChangeType::SupplyChange_Increase
}
}
impl NEMSupplyChangeType {
pub(in super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<NEMSupplyChangeType>("NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeType")
}
}
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMAggregateModification {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.modifications)
pub modifications: ::std::vec::Vec<nemaggregate_modification::NEMCosignatoryModification>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.relative_change)
pub relative_change: ::std::option::Option<i32>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMAggregateModification {
fn default() -> &'a NEMAggregateModification {
<NEMAggregateModification as ::protobuf::Message>::default_instance()
}
}
impl NEMAggregateModification {
pub fn new() -> NEMAggregateModification {
::std::default::Default::default()
}
// optional sint32 relative_change = 2;
pub fn relative_change(&self) -> i32 {
self.relative_change.unwrap_or(0)
}
pub fn clear_relative_change(&mut self) {
self.relative_change = ::std::option::Option::None;
}
pub fn has_relative_change(&self) -> bool {
self.relative_change.is_some()
}
// Param is passed by value, moved
pub fn set_relative_change(&mut self, v: i32) {
self.relative_change = ::std::option::Option::Some(v);
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"modifications",
|m: &NEMAggregateModification| { &m.modifications },
|m: &mut NEMAggregateModification| { &mut m.modifications },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"relative_change",
|m: &NEMAggregateModification| { &m.relative_change },
|m: &mut NEMAggregateModification| { &mut m.relative_change },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMAggregateModification>(
"NEMSignTx.NEMAggregateModification",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMAggregateModification {
const NAME: &'static str = "NEMAggregateModification";
fn is_initialized(&self) -> bool {
for v in &self.modifications {
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.modifications.push(is.read_message()?);
},
16 => {
self.relative_change = ::std::option::Option::Some(is.read_sint32()?);
},
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.modifications {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
if let Some(v) = self.relative_change {
my_size += ::protobuf::rt::sint32_size(2, v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.modifications {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
};
if let Some(v) = self.relative_change {
os.write_sint32(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() -> NEMAggregateModification {
NEMAggregateModification::new()
}
fn clear(&mut self) {
self.modifications.clear();
self.relative_change = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMAggregateModification {
static instance: NEMAggregateModification = NEMAggregateModification {
modifications: ::std::vec::Vec::new(),
relative_change: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMAggregateModification {
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("NEMSignTx.NEMAggregateModification").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMAggregateModification {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMAggregateModification {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMAggregateModification`
pub mod nemaggregate_modification {
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMCosignatoryModification {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.type)
pub type_: ::std::option::Option<::protobuf::EnumOrUnknown<nemcosignatory_modification::NEMModificationType>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.public_key)
pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMCosignatoryModification {
fn default() -> &'a NEMCosignatoryModification {
<NEMCosignatoryModification as ::protobuf::Message>::default_instance()
}
}
impl NEMCosignatoryModification {
pub fn new() -> NEMCosignatoryModification {
::std::default::Default::default()
}
// required .hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.NEMModificationType type = 1;
pub fn type_(&self) -> nemcosignatory_modification::NEMModificationType {
match self.type_ {
Some(e) => e.enum_value_or(nemcosignatory_modification::NEMModificationType::CosignatoryModification_Add),
None => nemcosignatory_modification::NEMModificationType::CosignatoryModification_Add,
}
}
pub fn clear_type_(&mut self) {
self.type_ = ::std::option::Option::None;
}
pub fn has_type(&self) -> bool {
self.type_.is_some()
}
// Param is passed by value, moved
pub fn set_type(&mut self, v: nemcosignatory_modification::NEMModificationType) {
self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
// required bytes public_key = 2;
pub fn public_key(&self) -> &[u8] {
match self.public_key.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_public_key(&mut self) {
self.public_key = ::std::option::Option::None;
}
pub fn has_public_key(&self) -> bool {
self.public_key.is_some()
}
// Param is passed by value, moved
pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.public_key.is_none() {
self.public_key = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.public_key.as_mut().unwrap()
}
// Take field
pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub(in super::super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"type",
|m: &NEMCosignatoryModification| { &m.type_ },
|m: &mut NEMCosignatoryModification| { &mut m.type_ },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"public_key",
|m: &NEMCosignatoryModification| { &m.public_key },
|m: &mut NEMCosignatoryModification| { &mut m.public_key },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMCosignatoryModification>(
"NEMSignTx.NEMAggregateModification.NEMCosignatoryModification",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMCosignatoryModification {
const NAME: &'static str = "NEMCosignatoryModification";
fn is_initialized(&self) -> bool {
if self.type_.is_none() {
return false;
}
if self.public_key.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
18 => {
self.public_key = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.type_ {
my_size += ::protobuf::rt::int32_size(1, v.value());
}
if let Some(v) = self.public_key.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.type_ {
os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.public_key.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() -> NEMCosignatoryModification {
NEMCosignatoryModification::new()
}
fn clear(&mut self) {
self.type_ = ::std::option::Option::None;
self.public_key = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMCosignatoryModification {
static instance: NEMCosignatoryModification = NEMCosignatoryModification {
type_: ::std::option::Option::None,
public_key: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMCosignatoryModification {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::file_descriptor().message_by_package_relative_name("NEMSignTx.NEMAggregateModification.NEMCosignatoryModification").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMCosignatoryModification {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMCosignatoryModification {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMCosignatoryModification`
pub mod nemcosignatory_modification {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.NEMModificationType)
pub enum NEMModificationType {
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.NEMModificationType.CosignatoryModification_Add)
CosignatoryModification_Add = 1,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.NEMModificationType.CosignatoryModification_Delete)
CosignatoryModification_Delete = 2,
}
impl ::protobuf::Enum for NEMModificationType {
const NAME: &'static str = "NEMModificationType";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NEMModificationType> {
match value {
1 => ::std::option::Option::Some(NEMModificationType::CosignatoryModification_Add),
2 => ::std::option::Option::Some(NEMModificationType::CosignatoryModification_Delete),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<NEMModificationType> {
match str {
"CosignatoryModification_Add" => ::std::option::Option::Some(NEMModificationType::CosignatoryModification_Add),
"CosignatoryModification_Delete" => ::std::option::Option::Some(NEMModificationType::CosignatoryModification_Delete),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [NEMModificationType] = &[
NEMModificationType::CosignatoryModification_Add,
NEMModificationType::CosignatoryModification_Delete,
];
}
impl ::protobuf::EnumFull for NEMModificationType {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::super::file_descriptor().enum_by_package_relative_name("NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.NEMModificationType").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
NEMModificationType::CosignatoryModification_Add => 0,
NEMModificationType::CosignatoryModification_Delete => 1,
};
Self::enum_descriptor().value_by_index(index)
}
}
// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for NEMModificationType {
fn default() -> Self {
NEMModificationType::CosignatoryModification_Add
}
}
impl NEMModificationType {
pub(in super::super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<NEMModificationType>("NEMSignTx.NEMAggregateModification.NEMCosignatoryModification.NEMModificationType")
}
}
}
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMImportanceTransfer {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.mode)
pub mode: ::std::option::Option<::protobuf::EnumOrUnknown<nemimportance_transfer::NEMImportanceTransferMode>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.public_key)
pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMImportanceTransfer {
fn default() -> &'a NEMImportanceTransfer {
<NEMImportanceTransfer as ::protobuf::Message>::default_instance()
}
}
impl NEMImportanceTransfer {
pub fn new() -> NEMImportanceTransfer {
::std::default::Default::default()
}
// required .hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.NEMImportanceTransferMode mode = 1;
pub fn mode(&self) -> nemimportance_transfer::NEMImportanceTransferMode {
match self.mode {
Some(e) => e.enum_value_or(nemimportance_transfer::NEMImportanceTransferMode::ImportanceTransfer_Activate),
None => nemimportance_transfer::NEMImportanceTransferMode::ImportanceTransfer_Activate,
}
}
pub fn clear_mode(&mut self) {
self.mode = ::std::option::Option::None;
}
pub fn has_mode(&self) -> bool {
self.mode.is_some()
}
// Param is passed by value, moved
pub fn set_mode(&mut self, v: nemimportance_transfer::NEMImportanceTransferMode) {
self.mode = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v));
}
// required bytes public_key = 2;
pub fn public_key(&self) -> &[u8] {
match self.public_key.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_public_key(&mut self) {
self.public_key = ::std::option::Option::None;
}
pub fn has_public_key(&self) -> bool {
self.public_key.is_some()
}
// Param is passed by value, moved
pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.public_key.is_none() {
self.public_key = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.public_key.as_mut().unwrap()
}
// Take field
pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"mode",
|m: &NEMImportanceTransfer| { &m.mode },
|m: &mut NEMImportanceTransfer| { &mut m.mode },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"public_key",
|m: &NEMImportanceTransfer| { &m.public_key },
|m: &mut NEMImportanceTransfer| { &mut m.public_key },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMImportanceTransfer>(
"NEMSignTx.NEMImportanceTransfer",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMImportanceTransfer {
const NAME: &'static str = "NEMImportanceTransfer";
fn is_initialized(&self) -> bool {
if self.mode.is_none() {
return false;
}
if self.public_key.is_none() {
return false;
}
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.mode = ::std::option::Option::Some(is.read_enum_or_unknown()?);
},
18 => {
self.public_key = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.mode {
my_size += ::protobuf::rt::int32_size(1, v.value());
}
if let Some(v) = self.public_key.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.mode {
os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?;
}
if let Some(v) = self.public_key.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() -> NEMImportanceTransfer {
NEMImportanceTransfer::new()
}
fn clear(&mut self) {
self.mode = ::std::option::Option::None;
self.public_key = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMImportanceTransfer {
static instance: NEMImportanceTransfer = NEMImportanceTransfer {
mode: ::std::option::Option::None,
public_key: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMImportanceTransfer {
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("NEMSignTx.NEMImportanceTransfer").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMImportanceTransfer {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMImportanceTransfer {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
/// Nested message and enums of message `NEMImportanceTransfer`
pub mod nemimportance_transfer {
#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)]
// @@protoc_insertion_point(enum:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.NEMImportanceTransferMode)
pub enum NEMImportanceTransferMode {
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.NEMImportanceTransferMode.ImportanceTransfer_Activate)
ImportanceTransfer_Activate = 1,
// @@protoc_insertion_point(enum_value:hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.NEMImportanceTransferMode.ImportanceTransfer_Deactivate)
ImportanceTransfer_Deactivate = 2,
}
impl ::protobuf::Enum for NEMImportanceTransferMode {
const NAME: &'static str = "NEMImportanceTransferMode";
fn value(&self) -> i32 {
*self as i32
}
fn from_i32(value: i32) -> ::std::option::Option<NEMImportanceTransferMode> {
match value {
1 => ::std::option::Option::Some(NEMImportanceTransferMode::ImportanceTransfer_Activate),
2 => ::std::option::Option::Some(NEMImportanceTransferMode::ImportanceTransfer_Deactivate),
_ => ::std::option::Option::None
}
}
fn from_str(str: &str) -> ::std::option::Option<NEMImportanceTransferMode> {
match str {
"ImportanceTransfer_Activate" => ::std::option::Option::Some(NEMImportanceTransferMode::ImportanceTransfer_Activate),
"ImportanceTransfer_Deactivate" => ::std::option::Option::Some(NEMImportanceTransferMode::ImportanceTransfer_Deactivate),
_ => ::std::option::Option::None
}
}
const VALUES: &'static [NEMImportanceTransferMode] = &[
NEMImportanceTransferMode::ImportanceTransfer_Activate,
NEMImportanceTransferMode::ImportanceTransfer_Deactivate,
];
}
impl ::protobuf::EnumFull for NEMImportanceTransferMode {
fn enum_descriptor() -> ::protobuf::reflect::EnumDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::EnumDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::super::file_descriptor().enum_by_package_relative_name("NEMSignTx.NEMImportanceTransfer.NEMImportanceTransferMode").unwrap()).clone()
}
fn descriptor(&self) -> ::protobuf::reflect::EnumValueDescriptor {
let index = match self {
NEMImportanceTransferMode::ImportanceTransfer_Activate => 0,
NEMImportanceTransferMode::ImportanceTransfer_Deactivate => 1,
};
Self::enum_descriptor().value_by_index(index)
}
}
// Note, `Default` is implemented although default value is not 0
impl ::std::default::Default for NEMImportanceTransferMode {
fn default() -> Self {
NEMImportanceTransferMode::ImportanceTransfer_Activate
}
}
impl NEMImportanceTransferMode {
pub(in super::super) fn generated_enum_descriptor_data() -> ::protobuf::reflect::GeneratedEnumDescriptorData {
::protobuf::reflect::GeneratedEnumDescriptorData::new::<NEMImportanceTransferMode>("NEMSignTx.NEMImportanceTransfer.NEMImportanceTransferMode")
}
}
}
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMSignedTx)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMSignedTx {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignedTx.data)
pub data: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMSignedTx.signature)
pub signature: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMSignedTx.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMSignedTx {
fn default() -> &'a NEMSignedTx {
<NEMSignedTx as ::protobuf::Message>::default_instance()
}
}
impl NEMSignedTx {
pub fn new() -> NEMSignedTx {
::std::default::Default::default()
}
// required bytes data = 1;
pub fn data(&self) -> &[u8] {
match self.data.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_data(&mut self) {
self.data = ::std::option::Option::None;
}
pub fn has_data(&self) -> bool {
self.data.is_some()
}
// Param is passed by value, moved
pub fn set_data(&mut self, v: ::std::vec::Vec<u8>) {
self.data = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_data(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.data.is_none() {
self.data = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.data.as_mut().unwrap()
}
// Take field
pub fn take_data(&mut self) -> ::std::vec::Vec<u8> {
self.data.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// required bytes signature = 2;
pub fn signature(&self) -> &[u8] {
match self.signature.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_signature(&mut self) {
self.signature = ::std::option::Option::None;
}
pub fn has_signature(&self) -> bool {
self.signature.is_some()
}
// Param is passed by value, moved
pub fn set_signature(&mut self, v: ::std::vec::Vec<u8>) {
self.signature = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.signature.is_none() {
self.signature = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.signature.as_mut().unwrap()
}
// Take field
pub fn take_signature(&mut self) -> ::std::vec::Vec<u8> {
self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
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::<_, _>(
"data",
|m: &NEMSignedTx| { &m.data },
|m: &mut NEMSignedTx| { &mut m.data },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"signature",
|m: &NEMSignedTx| { &m.signature },
|m: &mut NEMSignedTx| { &mut m.signature },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMSignedTx>(
"NEMSignedTx",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMSignedTx {
const NAME: &'static str = "NEMSignedTx";
fn is_initialized(&self) -> bool {
if self.data.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.data = ::std::option::Option::Some(is.read_bytes()?);
},
18 => {
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.data.as_ref() {
my_size += ::protobuf::rt::bytes_size(1, &v);
}
if let Some(v) = self.signature.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.data.as_ref() {
os.write_bytes(1, v)?;
}
if let Some(v) = self.signature.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() -> NEMSignedTx {
NEMSignedTx::new()
}
fn clear(&mut self) {
self.data = ::std::option::Option::None;
self.signature = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMSignedTx {
static instance: NEMSignedTx = NEMSignedTx {
data: ::std::option::Option::None,
signature: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMSignedTx {
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("NEMSignedTx").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMSignedTx {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMSignedTx {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMDecryptMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMDecryptMessage {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMDecryptMessage.address_n)
pub address_n: ::std::vec::Vec<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMDecryptMessage.network)
pub network: ::std::option::Option<u32>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMDecryptMessage.public_key)
pub public_key: ::std::option::Option<::std::vec::Vec<u8>>,
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMDecryptMessage.payload)
pub payload: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMDecryptMessage.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMDecryptMessage {
fn default() -> &'a NEMDecryptMessage {
<NEMDecryptMessage as ::protobuf::Message>::default_instance()
}
}
impl NEMDecryptMessage {
pub fn new() -> NEMDecryptMessage {
::std::default::Default::default()
}
// optional uint32 network = 2;
pub fn network(&self) -> u32 {
self.network.unwrap_or(0)
}
pub fn clear_network(&mut self) {
self.network = ::std::option::Option::None;
}
pub fn has_network(&self) -> bool {
self.network.is_some()
}
// Param is passed by value, moved
pub fn set_network(&mut self, v: u32) {
self.network = ::std::option::Option::Some(v);
}
// optional bytes public_key = 3;
pub fn public_key(&self) -> &[u8] {
match self.public_key.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_public_key(&mut self) {
self.public_key = ::std::option::Option::None;
}
pub fn has_public_key(&self) -> bool {
self.public_key.is_some()
}
// Param is passed by value, moved
pub fn set_public_key(&mut self, v: ::std::vec::Vec<u8>) {
self.public_key = ::std::option::Option::Some(v);
}
// Mutable pointer to the field.
// If field is not initialized, it is initialized with default value first.
pub fn mut_public_key(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.public_key.is_none() {
self.public_key = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.public_key.as_mut().unwrap()
}
// Take field
pub fn take_public_key(&mut self) -> ::std::vec::Vec<u8> {
self.public_key.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
// optional bytes payload = 4;
pub fn payload(&self) -> &[u8] {
match self.payload.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_payload(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_payload(&self) -> bool {
self.payload.is_some()
}
// Param is passed by value, moved
pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
self.payload = ::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_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.payload.is_none() {
self.payload = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.payload.as_mut().unwrap()
}
// Take field
pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
self.payload.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(4);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"address_n",
|m: &NEMDecryptMessage| { &m.address_n },
|m: &mut NEMDecryptMessage| { &mut m.address_n },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"network",
|m: &NEMDecryptMessage| { &m.network },
|m: &mut NEMDecryptMessage| { &mut m.network },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"public_key",
|m: &NEMDecryptMessage| { &m.public_key },
|m: &mut NEMDecryptMessage| { &mut m.public_key },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"payload",
|m: &NEMDecryptMessage| { &m.payload },
|m: &mut NEMDecryptMessage| { &mut m.payload },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMDecryptMessage>(
"NEMDecryptMessage",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMDecryptMessage {
const NAME: &'static str = "NEMDecryptMessage";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
is.read_repeated_packed_uint32_into(&mut self.address_n)?;
},
8 => {
self.address_n.push(is.read_uint32()?);
},
16 => {
self.network = ::std::option::Option::Some(is.read_uint32()?);
},
26 => {
self.public_key = ::std::option::Option::Some(is.read_bytes()?);
},
34 => {
self.payload = ::std::option::Option::Some(is.read_bytes()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
// Compute sizes of nested messages
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.address_n {
my_size += ::protobuf::rt::uint32_size(1, *value);
};
if let Some(v) = self.network {
my_size += ::protobuf::rt::uint32_size(2, v);
}
if let Some(v) = self.public_key.as_ref() {
my_size += ::protobuf::rt::bytes_size(3, &v);
}
if let Some(v) = self.payload.as_ref() {
my_size += ::protobuf::rt::bytes_size(4, &v);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.address_n {
os.write_uint32(1, *v)?;
};
if let Some(v) = self.network {
os.write_uint32(2, v)?;
}
if let Some(v) = self.public_key.as_ref() {
os.write_bytes(3, v)?;
}
if let Some(v) = self.payload.as_ref() {
os.write_bytes(4, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> NEMDecryptMessage {
NEMDecryptMessage::new()
}
fn clear(&mut self) {
self.address_n.clear();
self.network = ::std::option::Option::None;
self.public_key = ::std::option::Option::None;
self.payload = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMDecryptMessage {
static instance: NEMDecryptMessage = NEMDecryptMessage {
address_n: ::std::vec::Vec::new(),
network: ::std::option::Option::None,
public_key: ::std::option::Option::None,
payload: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMDecryptMessage {
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("NEMDecryptMessage").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMDecryptMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMDecryptMessage {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
// @@protoc_insertion_point(message:hw.trezor.messages.nem.NEMDecryptedMessage)
#[derive(PartialEq,Clone,Default,Debug)]
pub struct NEMDecryptedMessage {
// message fields
// @@protoc_insertion_point(field:hw.trezor.messages.nem.NEMDecryptedMessage.payload)
pub payload: ::std::option::Option<::std::vec::Vec<u8>>,
// special fields
// @@protoc_insertion_point(special_field:hw.trezor.messages.nem.NEMDecryptedMessage.special_fields)
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a NEMDecryptedMessage {
fn default() -> &'a NEMDecryptedMessage {
<NEMDecryptedMessage as ::protobuf::Message>::default_instance()
}
}
impl NEMDecryptedMessage {
pub fn new() -> NEMDecryptedMessage {
::std::default::Default::default()
}
// required bytes payload = 1;
pub fn payload(&self) -> &[u8] {
match self.payload.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_payload(&mut self) {
self.payload = ::std::option::Option::None;
}
pub fn has_payload(&self) -> bool {
self.payload.is_some()
}
// Param is passed by value, moved
pub fn set_payload(&mut self, v: ::std::vec::Vec<u8>) {
self.payload = ::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_payload(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.payload.is_none() {
self.payload = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.payload.as_mut().unwrap()
}
// Take field
pub fn take_payload(&mut self) -> ::std::vec::Vec<u8> {
self.payload.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::<_, _>(
"payload",
|m: &NEMDecryptedMessage| { &m.payload },
|m: &mut NEMDecryptedMessage| { &mut m.payload },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<NEMDecryptedMessage>(
"NEMDecryptedMessage",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for NEMDecryptedMessage {
const NAME: &'static str = "NEMDecryptedMessage";
fn is_initialized(&self) -> bool {
if self.payload.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.payload = ::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.payload.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.payload.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() -> NEMDecryptedMessage {
NEMDecryptedMessage::new()
}
fn clear(&mut self) {
self.payload = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static NEMDecryptedMessage {
static instance: NEMDecryptedMessage = NEMDecryptedMessage {
payload: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for NEMDecryptedMessage {
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("NEMDecryptedMessage").unwrap()).clone()
}
}
impl ::std::fmt::Display for NEMDecryptedMessage {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for NEMDecryptedMessage {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x12messages-nem.proto\x12\x16hw.trezor.messages.nem\"\x8a\x01\n\rNEMG\
etAddress\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1d\n\
\x07network\x18\x02\x20\x01(\r:\x03104R\x07network\x12!\n\x0cshow_displa\
y\x18\x03\x20\x01(\x08R\x0bshowDisplay\x12\x1a\n\x08chunkify\x18\x04\x20\
\x01(\x08R\x08chunkify\"&\n\nNEMAddress\x12\x18\n\x07address\x18\x01\x20\
\x02(\tR\x07address\"\xa2\x19\n\tNEMSignTx\x12X\n\x0btransaction\x18\x01\
\x20\x02(\x0b26.hw.trezor.messages.nem.NEMSignTx.NEMTransactionCommonR\
\x0btransaction\x12R\n\x08multisig\x18\x02\x20\x01(\x0b26.hw.trezor.mess\
ages.nem.NEMSignTx.NEMTransactionCommonR\x08multisig\x12I\n\x08transfer\
\x18\x03\x20\x01(\x0b2-.hw.trezor.messages.nem.NEMSignTx.NEMTransferR\
\x08transfer\x12\x1c\n\tcosigning\x18\x04\x20\x01(\x08R\tcosigning\x12h\
\n\x13provision_namespace\x18\x05\x20\x01(\x0b27.hw.trezor.messages.nem.\
NEMSignTx.NEMProvisionNamespaceR\x12provisionNamespace\x12\\\n\x0fmosaic\
_creation\x18\x06\x20\x01(\x0b23.hw.trezor.messages.nem.NEMSignTx.NEMMos\
aicCreationR\x0emosaicCreation\x12\\\n\rsupply_change\x18\x07\x20\x01(\
\x0b27.hw.trezor.messages.nem.NEMSignTx.NEMMosaicSupplyChangeR\x0csupply\
Change\x12q\n\x16aggregate_modification\x18\x08\x20\x01(\x0b2:.hw.trezor\
.messages.nem.NEMSignTx.NEMAggregateModificationR\x15aggregateModificati\
on\x12h\n\x13importance_transfer\x18\t\x20\x01(\x0b27.hw.trezor.messages\
.nem.NEMSignTx.NEMImportanceTransferR\x12importanceTransfer\x12\x1a\n\
\x08chunkify\x18\n\x20\x01(\x08R\x08chunkify\x1a\xb6\x01\n\x14NEMTransac\
tionCommon\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x1d\
\n\x07network\x18\x02\x20\x01(\r:\x03104R\x07network\x12\x1c\n\ttimestam\
p\x18\x03\x20\x02(\rR\ttimestamp\x12\x10\n\x03fee\x18\x04\x20\x02(\x04R\
\x03fee\x12\x1a\n\x08deadline\x18\x05\x20\x02(\rR\x08deadline\x12\x16\n\
\x06signer\x18\x06\x20\x01(\x0cR\x06signer\x1a\xae\x02\n\x0bNEMTransfer\
\x12\x1c\n\trecipient\x18\x01\x20\x02(\tR\trecipient\x12\x16\n\x06amount\
\x18\x02\x20\x02(\x04R\x06amount\x12\x18\n\x07payload\x18\x03\x20\x01(\
\x0cR\x07payload\x12\x1d\n\npublic_key\x18\x04\x20\x01(\x0cR\tpublicKey\
\x12Q\n\x07mosaics\x18\x05\x20\x03(\x0b27.hw.trezor.messages.nem.NEMSign\
Tx.NEMTransfer.NEMMosaicR\x07mosaics\x1a]\n\tNEMMosaic\x12\x1c\n\tnamesp\
ace\x18\x01\x20\x02(\tR\tnamespace\x12\x16\n\x06mosaic\x18\x02\x20\x02(\
\tR\x06mosaic\x12\x1a\n\x08quantity\x18\x03\x20\x02(\x04R\x08quantity\
\x1as\n\x15NEMProvisionNamespace\x12\x1c\n\tnamespace\x18\x01\x20\x02(\t\
R\tnamespace\x12\x16\n\x06parent\x18\x02\x20\x01(\tR\x06parent\x12\x12\n\
\x04sink\x18\x03\x20\x02(\tR\x04sink\x12\x10\n\x03fee\x18\x04\x20\x02(\
\x04R\x03fee\x1a\x8e\x06\n\x11NEMMosaicCreation\x12g\n\ndefinition\x18\
\x01\x20\x02(\x0b2G.hw.trezor.messages.nem.NEMSignTx.NEMMosaicCreation.N\
EMMosaicDefinitionR\ndefinition\x12\x12\n\x04sink\x18\x02\x20\x02(\tR\
\x04sink\x12\x10\n\x03fee\x18\x03\x20\x02(\x04R\x03fee\x1a\xe9\x04\n\x13\
NEMMosaicDefinition\x12\x12\n\x04name\x18\x01\x20\x01(\tR\x04name\x12\
\x16\n\x06ticker\x18\x02\x20\x01(\tR\x06ticker\x12\x1c\n\tnamespace\x18\
\x03\x20\x02(\tR\tnamespace\x12\x16\n\x06mosaic\x18\x04\x20\x02(\tR\x06m\
osaic\x12\"\n\x0cdivisibility\x18\x05\x20\x01(\rR\x0cdivisibility\x12i\n\
\x04levy\x18\x06\x20\x01(\x0e2U.hw.trezor.messages.nem.NEMSignTx.NEMMosa\
icCreation.NEMMosaicDefinition.NEMMosaicLevyR\x04levy\x12\x10\n\x03fee\
\x18\x07\x20\x01(\x04R\x03fee\x12!\n\x0clevy_address\x18\x08\x20\x01(\tR\
\x0blevyAddress\x12%\n\x0elevy_namespace\x18\t\x20\x01(\tR\rlevyNamespac\
e\x12\x1f\n\x0blevy_mosaic\x18\n\x20\x01(\tR\nlevyMosaic\x12\x16\n\x06su\
pply\x18\x0b\x20\x01(\x04R\x06supply\x12%\n\x0emutable_supply\x18\x0c\
\x20\x01(\x08R\rmutableSupply\x12\"\n\x0ctransferable\x18\r\x20\x01(\x08\
R\x0ctransferable\x12\x20\n\x0bdescription\x18\x0e\x20\x02(\tR\x0bdescri\
ption\x12\x1a\n\x08networks\x18\x0f\x20\x03(\rR\x08networks\"C\n\rNEMMos\
aicLevy\x12\x17\n\x13MosaicLevy_Absolute\x10\x01\x12\x19\n\x15MosaicLevy\
_Percentile\x10\x02\x1a\x91\x02\n\x15NEMMosaicSupplyChange\x12\x1c\n\tna\
mespace\x18\x01\x20\x02(\tR\tnamespace\x12\x16\n\x06mosaic\x18\x02\x20\
\x02(\tR\x06mosaic\x12_\n\x04type\x18\x03\x20\x02(\x0e2K.hw.trezor.messa\
ges.nem.NEMSignTx.NEMMosaicSupplyChange.NEMSupplyChangeTypeR\x04type\x12\
\x14\n\x05delta\x18\x04\x20\x02(\x04R\x05delta\"K\n\x13NEMSupplyChangeTy\
pe\x12\x19\n\x15SupplyChange_Increase\x10\x01\x12\x19\n\x15SupplyChange_\
Decrease\x10\x02\x1a\xd9\x03\n\x18NEMAggregateModification\x12{\n\rmodif\
ications\x18\x01\x20\x03(\x0b2U.hw.trezor.messages.nem.NEMSignTx.NEMAggr\
egateModification.NEMCosignatoryModificationR\rmodifications\x12'\n\x0fr\
elative_change\x18\x02\x20\x01(\x11R\x0erelativeChange\x1a\x96\x02\n\x1a\
NEMCosignatoryModification\x12}\n\x04type\x18\x01\x20\x02(\x0e2i.hw.trez\
or.messages.nem.NEMSignTx.NEMAggregateModification.NEMCosignatoryModific\
ation.NEMModificationTypeR\x04type\x12\x1d\n\npublic_key\x18\x02\x20\x02\
(\x0cR\tpublicKey\"Z\n\x13NEMModificationType\x12\x1f\n\x1bCosignatoryMo\
dification_Add\x10\x01\x12\"\n\x1eCosignatoryModification_Delete\x10\x02\
\x1a\xfe\x01\n\x15NEMImportanceTransfer\x12e\n\x04mode\x18\x01\x20\x02(\
\x0e2Q.hw.trezor.messages.nem.NEMSignTx.NEMImportanceTransfer.NEMImporta\
nceTransferModeR\x04mode\x12\x1d\n\npublic_key\x18\x02\x20\x02(\x0cR\tpu\
blicKey\"_\n\x19NEMImportanceTransferMode\x12\x1f\n\x1bImportanceTransfe\
r_Activate\x10\x01\x12!\n\x1dImportanceTransfer_Deactivate\x10\x02\"?\n\
\x0bNEMSignedTx\x12\x12\n\x04data\x18\x01\x20\x02(\x0cR\x04data\x12\x1c\
\n\tsignature\x18\x02\x20\x02(\x0cR\tsignature\"\x83\x01\n\x11NEMDecrypt\
Message\x12\x1b\n\taddress_n\x18\x01\x20\x03(\rR\x08addressN\x12\x18\n\
\x07network\x18\x02\x20\x01(\rR\x07network\x12\x1d\n\npublic_key\x18\x03\
\x20\x01(\x0cR\tpublicKey\x12\x18\n\x07payload\x18\x04\x20\x01(\x0cR\x07\
payload\"/\n\x13NEMDecryptedMessage\x12\x18\n\x07payload\x18\x01\x20\x02\
(\x0cR\x07payloadB7\n#com.satoshilabs.trezor.lib.protobufB\x10TrezorMess\
ageNem\
";
/// `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(16);
messages.push(NEMGetAddress::generated_message_descriptor_data());
messages.push(NEMAddress::generated_message_descriptor_data());
messages.push(NEMSignTx::generated_message_descriptor_data());
messages.push(NEMSignedTx::generated_message_descriptor_data());
messages.push(NEMDecryptMessage::generated_message_descriptor_data());
messages.push(NEMDecryptedMessage::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMTransactionCommon::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMTransfer::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMProvisionNamespace::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMMosaicCreation::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMMosaicSupplyChange::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMAggregateModification::generated_message_descriptor_data());
messages.push(nemsign_tx::NEMImportanceTransfer::generated_message_descriptor_data());
messages.push(nemsign_tx::nemtransfer::NEMMosaic::generated_message_descriptor_data());
messages.push(nemsign_tx::nemmosaic_creation::NEMMosaicDefinition::generated_message_descriptor_data());
messages.push(nemsign_tx::nemaggregate_modification::NEMCosignatoryModification::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(4);
enums.push(nemsign_tx::nemmosaic_creation::nemmosaic_definition::NEMMosaicLevy::generated_enum_descriptor_data());
enums.push(nemsign_tx::nemmosaic_supply_change::NEMSupplyChangeType::generated_enum_descriptor_data());
enums.push(nemsign_tx::nemaggregate_modification::nemcosignatory_modification::NEMModificationType::generated_enum_descriptor_data());
enums.push(nemsign_tx::nemimportance_transfer::NEMImportanceTransferMode::generated_enum_descriptor_data());
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}