#![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)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct WebAuthnListResidentCredentials {
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a WebAuthnListResidentCredentials {
fn default() -> &'a WebAuthnListResidentCredentials {
<WebAuthnListResidentCredentials as ::protobuf::Message>::default_instance()
}
}
impl WebAuthnListResidentCredentials {
pub fn new() -> WebAuthnListResidentCredentials {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(0);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnListResidentCredentials>(
"WebAuthnListResidentCredentials",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for WebAuthnListResidentCredentials {
const NAME: &'static str = "WebAuthnListResidentCredentials";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> WebAuthnListResidentCredentials {
WebAuthnListResidentCredentials::new()
}
fn clear(&mut self) {
self.special_fields.clear();
}
fn default_instance() -> &'static WebAuthnListResidentCredentials {
static instance: WebAuthnListResidentCredentials = WebAuthnListResidentCredentials {
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for WebAuthnListResidentCredentials {
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("WebAuthnListResidentCredentials").unwrap()).clone()
}
}
impl ::std::fmt::Display for WebAuthnListResidentCredentials {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WebAuthnListResidentCredentials {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct WebAuthnAddResidentCredential {
pub credential_id: ::std::option::Option<::std::vec::Vec<u8>>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a WebAuthnAddResidentCredential {
fn default() -> &'a WebAuthnAddResidentCredential {
<WebAuthnAddResidentCredential as ::protobuf::Message>::default_instance()
}
}
impl WebAuthnAddResidentCredential {
pub fn new() -> WebAuthnAddResidentCredential {
::std::default::Default::default()
}
pub fn credential_id(&self) -> &[u8] {
match self.credential_id.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_credential_id(&mut self) {
self.credential_id = ::std::option::Option::None;
}
pub fn has_credential_id(&self) -> bool {
self.credential_id.is_some()
}
pub fn set_credential_id(&mut self, v: ::std::vec::Vec<u8>) {
self.credential_id = ::std::option::Option::Some(v);
}
pub fn mut_credential_id(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.credential_id.is_none() {
self.credential_id = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.credential_id.as_mut().unwrap()
}
pub fn take_credential_id(&mut self) -> ::std::vec::Vec<u8> {
self.credential_id.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::<_, _>(
"credential_id",
|m: &WebAuthnAddResidentCredential| { &m.credential_id },
|m: &mut WebAuthnAddResidentCredential| { &mut m.credential_id },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnAddResidentCredential>(
"WebAuthnAddResidentCredential",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for WebAuthnAddResidentCredential {
const NAME: &'static str = "WebAuthnAddResidentCredential";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.credential_id = ::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(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.credential_id.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.credential_id.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() -> WebAuthnAddResidentCredential {
WebAuthnAddResidentCredential::new()
}
fn clear(&mut self) {
self.credential_id = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static WebAuthnAddResidentCredential {
static instance: WebAuthnAddResidentCredential = WebAuthnAddResidentCredential {
credential_id: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for WebAuthnAddResidentCredential {
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("WebAuthnAddResidentCredential").unwrap()).clone()
}
}
impl ::std::fmt::Display for WebAuthnAddResidentCredential {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WebAuthnAddResidentCredential {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct WebAuthnRemoveResidentCredential {
pub index: ::std::option::Option<u32>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a WebAuthnRemoveResidentCredential {
fn default() -> &'a WebAuthnRemoveResidentCredential {
<WebAuthnRemoveResidentCredential as ::protobuf::Message>::default_instance()
}
}
impl WebAuthnRemoveResidentCredential {
pub fn new() -> WebAuthnRemoveResidentCredential {
::std::default::Default::default()
}
pub fn index(&self) -> u32 {
self.index.unwrap_or(0)
}
pub fn clear_index(&mut self) {
self.index = ::std::option::Option::None;
}
pub fn has_index(&self) -> bool {
self.index.is_some()
}
pub fn set_index(&mut self, v: u32) {
self.index = ::std::option::Option::Some(v);
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"index",
|m: &WebAuthnRemoveResidentCredential| { &m.index },
|m: &mut WebAuthnRemoveResidentCredential| { &mut m.index },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnRemoveResidentCredential>(
"WebAuthnRemoveResidentCredential",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for WebAuthnRemoveResidentCredential {
const NAME: &'static str = "WebAuthnRemoveResidentCredential";
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 {
8 => {
self.index = ::std::option::Option::Some(is.read_uint32()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.index {
my_size += ::protobuf::rt::uint32_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.index {
os.write_uint32(1, v)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> WebAuthnRemoveResidentCredential {
WebAuthnRemoveResidentCredential::new()
}
fn clear(&mut self) {
self.index = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static WebAuthnRemoveResidentCredential {
static instance: WebAuthnRemoveResidentCredential = WebAuthnRemoveResidentCredential {
index: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for WebAuthnRemoveResidentCredential {
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("WebAuthnRemoveResidentCredential").unwrap()).clone()
}
}
impl ::std::fmt::Display for WebAuthnRemoveResidentCredential {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WebAuthnRemoveResidentCredential {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
#[derive(PartialEq,Clone,Default,Debug)]
pub struct WebAuthnCredentials {
pub credentials: ::std::vec::Vec<web_authn_credentials::WebAuthnCredential>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a WebAuthnCredentials {
fn default() -> &'a WebAuthnCredentials {
<WebAuthnCredentials as ::protobuf::Message>::default_instance()
}
}
impl WebAuthnCredentials {
pub fn new() -> WebAuthnCredentials {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(1);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"credentials",
|m: &WebAuthnCredentials| { &m.credentials },
|m: &mut WebAuthnCredentials| { &mut m.credentials },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnCredentials>(
"WebAuthnCredentials",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for WebAuthnCredentials {
const NAME: &'static str = "WebAuthnCredentials";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
10 => {
self.credentials.push(is.read_message()?);
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.credentials {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.credentials {
::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
};
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> WebAuthnCredentials {
WebAuthnCredentials::new()
}
fn clear(&mut self) {
self.credentials.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static WebAuthnCredentials {
static instance: WebAuthnCredentials = WebAuthnCredentials {
credentials: ::std::vec::Vec::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for WebAuthnCredentials {
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("WebAuthnCredentials").unwrap()).clone()
}
}
impl ::std::fmt::Display for WebAuthnCredentials {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WebAuthnCredentials {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod web_authn_credentials {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct WebAuthnCredential {
pub index: ::std::option::Option<u32>,
pub id: ::std::option::Option<::std::vec::Vec<u8>>,
pub rp_id: ::std::option::Option<::std::string::String>,
pub rp_name: ::std::option::Option<::std::string::String>,
pub user_id: ::std::option::Option<::std::vec::Vec<u8>>,
pub user_name: ::std::option::Option<::std::string::String>,
pub user_display_name: ::std::option::Option<::std::string::String>,
pub creation_time: ::std::option::Option<u32>,
pub hmac_secret: ::std::option::Option<bool>,
pub use_sign_count: ::std::option::Option<bool>,
pub algorithm: ::std::option::Option<i32>,
pub curve: ::std::option::Option<i32>,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a WebAuthnCredential {
fn default() -> &'a WebAuthnCredential {
<WebAuthnCredential as ::protobuf::Message>::default_instance()
}
}
impl WebAuthnCredential {
pub fn new() -> WebAuthnCredential {
::std::default::Default::default()
}
pub fn index(&self) -> u32 {
self.index.unwrap_or(0)
}
pub fn clear_index(&mut self) {
self.index = ::std::option::Option::None;
}
pub fn has_index(&self) -> bool {
self.index.is_some()
}
pub fn set_index(&mut self, v: u32) {
self.index = ::std::option::Option::Some(v);
}
pub fn id(&self) -> &[u8] {
match self.id.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_id(&mut self) {
self.id = ::std::option::Option::None;
}
pub fn has_id(&self) -> bool {
self.id.is_some()
}
pub fn set_id(&mut self, v: ::std::vec::Vec<u8>) {
self.id = ::std::option::Option::Some(v);
}
pub fn mut_id(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.id.is_none() {
self.id = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.id.as_mut().unwrap()
}
pub fn take_id(&mut self) -> ::std::vec::Vec<u8> {
self.id.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn rp_id(&self) -> &str {
match self.rp_id.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_rp_id(&mut self) {
self.rp_id = ::std::option::Option::None;
}
pub fn has_rp_id(&self) -> bool {
self.rp_id.is_some()
}
pub fn set_rp_id(&mut self, v: ::std::string::String) {
self.rp_id = ::std::option::Option::Some(v);
}
pub fn mut_rp_id(&mut self) -> &mut ::std::string::String {
if self.rp_id.is_none() {
self.rp_id = ::std::option::Option::Some(::std::string::String::new());
}
self.rp_id.as_mut().unwrap()
}
pub fn take_rp_id(&mut self) -> ::std::string::String {
self.rp_id.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn rp_name(&self) -> &str {
match self.rp_name.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_rp_name(&mut self) {
self.rp_name = ::std::option::Option::None;
}
pub fn has_rp_name(&self) -> bool {
self.rp_name.is_some()
}
pub fn set_rp_name(&mut self, v: ::std::string::String) {
self.rp_name = ::std::option::Option::Some(v);
}
pub fn mut_rp_name(&mut self) -> &mut ::std::string::String {
if self.rp_name.is_none() {
self.rp_name = ::std::option::Option::Some(::std::string::String::new());
}
self.rp_name.as_mut().unwrap()
}
pub fn take_rp_name(&mut self) -> ::std::string::String {
self.rp_name.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn user_id(&self) -> &[u8] {
match self.user_id.as_ref() {
Some(v) => v,
None => &[],
}
}
pub fn clear_user_id(&mut self) {
self.user_id = ::std::option::Option::None;
}
pub fn has_user_id(&self) -> bool {
self.user_id.is_some()
}
pub fn set_user_id(&mut self, v: ::std::vec::Vec<u8>) {
self.user_id = ::std::option::Option::Some(v);
}
pub fn mut_user_id(&mut self) -> &mut ::std::vec::Vec<u8> {
if self.user_id.is_none() {
self.user_id = ::std::option::Option::Some(::std::vec::Vec::new());
}
self.user_id.as_mut().unwrap()
}
pub fn take_user_id(&mut self) -> ::std::vec::Vec<u8> {
self.user_id.take().unwrap_or_else(|| ::std::vec::Vec::new())
}
pub fn user_name(&self) -> &str {
match self.user_name.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_user_name(&mut self) {
self.user_name = ::std::option::Option::None;
}
pub fn has_user_name(&self) -> bool {
self.user_name.is_some()
}
pub fn set_user_name(&mut self, v: ::std::string::String) {
self.user_name = ::std::option::Option::Some(v);
}
pub fn mut_user_name(&mut self) -> &mut ::std::string::String {
if self.user_name.is_none() {
self.user_name = ::std::option::Option::Some(::std::string::String::new());
}
self.user_name.as_mut().unwrap()
}
pub fn take_user_name(&mut self) -> ::std::string::String {
self.user_name.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn user_display_name(&self) -> &str {
match self.user_display_name.as_ref() {
Some(v) => v,
None => "",
}
}
pub fn clear_user_display_name(&mut self) {
self.user_display_name = ::std::option::Option::None;
}
pub fn has_user_display_name(&self) -> bool {
self.user_display_name.is_some()
}
pub fn set_user_display_name(&mut self, v: ::std::string::String) {
self.user_display_name = ::std::option::Option::Some(v);
}
pub fn mut_user_display_name(&mut self) -> &mut ::std::string::String {
if self.user_display_name.is_none() {
self.user_display_name = ::std::option::Option::Some(::std::string::String::new());
}
self.user_display_name.as_mut().unwrap()
}
pub fn take_user_display_name(&mut self) -> ::std::string::String {
self.user_display_name.take().unwrap_or_else(|| ::std::string::String::new())
}
pub fn creation_time(&self) -> u32 {
self.creation_time.unwrap_or(0)
}
pub fn clear_creation_time(&mut self) {
self.creation_time = ::std::option::Option::None;
}
pub fn has_creation_time(&self) -> bool {
self.creation_time.is_some()
}
pub fn set_creation_time(&mut self, v: u32) {
self.creation_time = ::std::option::Option::Some(v);
}
pub fn hmac_secret(&self) -> bool {
self.hmac_secret.unwrap_or(false)
}
pub fn clear_hmac_secret(&mut self) {
self.hmac_secret = ::std::option::Option::None;
}
pub fn has_hmac_secret(&self) -> bool {
self.hmac_secret.is_some()
}
pub fn set_hmac_secret(&mut self, v: bool) {
self.hmac_secret = ::std::option::Option::Some(v);
}
pub fn use_sign_count(&self) -> bool {
self.use_sign_count.unwrap_or(false)
}
pub fn clear_use_sign_count(&mut self) {
self.use_sign_count = ::std::option::Option::None;
}
pub fn has_use_sign_count(&self) -> bool {
self.use_sign_count.is_some()
}
pub fn set_use_sign_count(&mut self, v: bool) {
self.use_sign_count = ::std::option::Option::Some(v);
}
pub fn algorithm(&self) -> i32 {
self.algorithm.unwrap_or(0)
}
pub fn clear_algorithm(&mut self) {
self.algorithm = ::std::option::Option::None;
}
pub fn has_algorithm(&self) -> bool {
self.algorithm.is_some()
}
pub fn set_algorithm(&mut self, v: i32) {
self.algorithm = ::std::option::Option::Some(v);
}
pub fn curve(&self) -> i32 {
self.curve.unwrap_or(0)
}
pub fn clear_curve(&mut self) {
self.curve = ::std::option::Option::None;
}
pub fn has_curve(&self) -> bool {
self.curve.is_some()
}
pub fn set_curve(&mut self, v: i32) {
self.curve = ::std::option::Option::Some(v);
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(12);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"index",
|m: &WebAuthnCredential| { &m.index },
|m: &mut WebAuthnCredential| { &mut m.index },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"id",
|m: &WebAuthnCredential| { &m.id },
|m: &mut WebAuthnCredential| { &mut m.id },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"rp_id",
|m: &WebAuthnCredential| { &m.rp_id },
|m: &mut WebAuthnCredential| { &mut m.rp_id },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"rp_name",
|m: &WebAuthnCredential| { &m.rp_name },
|m: &mut WebAuthnCredential| { &mut m.rp_name },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"user_id",
|m: &WebAuthnCredential| { &m.user_id },
|m: &mut WebAuthnCredential| { &mut m.user_id },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"user_name",
|m: &WebAuthnCredential| { &m.user_name },
|m: &mut WebAuthnCredential| { &mut m.user_name },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"user_display_name",
|m: &WebAuthnCredential| { &m.user_display_name },
|m: &mut WebAuthnCredential| { &mut m.user_display_name },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"creation_time",
|m: &WebAuthnCredential| { &m.creation_time },
|m: &mut WebAuthnCredential| { &mut m.creation_time },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"hmac_secret",
|m: &WebAuthnCredential| { &m.hmac_secret },
|m: &mut WebAuthnCredential| { &mut m.hmac_secret },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"use_sign_count",
|m: &WebAuthnCredential| { &m.use_sign_count },
|m: &mut WebAuthnCredential| { &mut m.use_sign_count },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"algorithm",
|m: &WebAuthnCredential| { &m.algorithm },
|m: &mut WebAuthnCredential| { &mut m.algorithm },
));
fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
"curve",
|m: &WebAuthnCredential| { &m.curve },
|m: &mut WebAuthnCredential| { &mut m.curve },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnCredential>(
"WebAuthnCredentials.WebAuthnCredential",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for WebAuthnCredential {
const NAME: &'static str = "WebAuthnCredential";
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 {
8 => {
self.index = ::std::option::Option::Some(is.read_uint32()?);
},
18 => {
self.id = ::std::option::Option::Some(is.read_bytes()?);
},
26 => {
self.rp_id = ::std::option::Option::Some(is.read_string()?);
},
34 => {
self.rp_name = ::std::option::Option::Some(is.read_string()?);
},
42 => {
self.user_id = ::std::option::Option::Some(is.read_bytes()?);
},
50 => {
self.user_name = ::std::option::Option::Some(is.read_string()?);
},
58 => {
self.user_display_name = ::std::option::Option::Some(is.read_string()?);
},
64 => {
self.creation_time = ::std::option::Option::Some(is.read_uint32()?);
},
72 => {
self.hmac_secret = ::std::option::Option::Some(is.read_bool()?);
},
80 => {
self.use_sign_count = ::std::option::Option::Some(is.read_bool()?);
},
88 => {
self.algorithm = ::std::option::Option::Some(is.read_sint32()?);
},
96 => {
self.curve = ::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(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if let Some(v) = self.index {
my_size += ::protobuf::rt::uint32_size(1, v);
}
if let Some(v) = self.id.as_ref() {
my_size += ::protobuf::rt::bytes_size(2, &v);
}
if let Some(v) = self.rp_id.as_ref() {
my_size += ::protobuf::rt::string_size(3, &v);
}
if let Some(v) = self.rp_name.as_ref() {
my_size += ::protobuf::rt::string_size(4, &v);
}
if let Some(v) = self.user_id.as_ref() {
my_size += ::protobuf::rt::bytes_size(5, &v);
}
if let Some(v) = self.user_name.as_ref() {
my_size += ::protobuf::rt::string_size(6, &v);
}
if let Some(v) = self.user_display_name.as_ref() {
my_size += ::protobuf::rt::string_size(7, &v);
}
if let Some(v) = self.creation_time {
my_size += ::protobuf::rt::uint32_size(8, v);
}
if let Some(v) = self.hmac_secret {
my_size += 1 + 1;
}
if let Some(v) = self.use_sign_count {
my_size += 1 + 1;
}
if let Some(v) = self.algorithm {
my_size += ::protobuf::rt::sint32_size(11, v);
}
if let Some(v) = self.curve {
my_size += ::protobuf::rt::sint32_size(12, 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.index {
os.write_uint32(1, v)?;
}
if let Some(v) = self.id.as_ref() {
os.write_bytes(2, v)?;
}
if let Some(v) = self.rp_id.as_ref() {
os.write_string(3, v)?;
}
if let Some(v) = self.rp_name.as_ref() {
os.write_string(4, v)?;
}
if let Some(v) = self.user_id.as_ref() {
os.write_bytes(5, v)?;
}
if let Some(v) = self.user_name.as_ref() {
os.write_string(6, v)?;
}
if let Some(v) = self.user_display_name.as_ref() {
os.write_string(7, v)?;
}
if let Some(v) = self.creation_time {
os.write_uint32(8, v)?;
}
if let Some(v) = self.hmac_secret {
os.write_bool(9, v)?;
}
if let Some(v) = self.use_sign_count {
os.write_bool(10, v)?;
}
if let Some(v) = self.algorithm {
os.write_sint32(11, v)?;
}
if let Some(v) = self.curve {
os.write_sint32(12, 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() -> WebAuthnCredential {
WebAuthnCredential::new()
}
fn clear(&mut self) {
self.index = ::std::option::Option::None;
self.id = ::std::option::Option::None;
self.rp_id = ::std::option::Option::None;
self.rp_name = ::std::option::Option::None;
self.user_id = ::std::option::Option::None;
self.user_name = ::std::option::Option::None;
self.user_display_name = ::std::option::Option::None;
self.creation_time = ::std::option::Option::None;
self.hmac_secret = ::std::option::Option::None;
self.use_sign_count = ::std::option::Option::None;
self.algorithm = ::std::option::Option::None;
self.curve = ::std::option::Option::None;
self.special_fields.clear();
}
fn default_instance() -> &'static WebAuthnCredential {
static instance: WebAuthnCredential = WebAuthnCredential {
index: ::std::option::Option::None,
id: ::std::option::Option::None,
rp_id: ::std::option::Option::None,
rp_name: ::std::option::Option::None,
user_id: ::std::option::Option::None,
user_name: ::std::option::Option::None,
user_display_name: ::std::option::Option::None,
creation_time: ::std::option::Option::None,
hmac_secret: ::std::option::Option::None,
use_sign_count: ::std::option::Option::None,
algorithm: ::std::option::Option::None,
curve: ::std::option::Option::None,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for WebAuthnCredential {
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("WebAuthnCredentials.WebAuthnCredential").unwrap()).clone()
}
}
impl ::std::fmt::Display for WebAuthnCredential {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for WebAuthnCredential {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n\x17messages-webauthn.proto\x12\x1bhw.trezor.messages.webauthn\"!\n\
\x1fWebAuthnListResidentCredentials\"D\n\x1dWebAuthnAddResidentCredentia\
l\x12#\n\rcredential_id\x18\x01\x20\x01(\x0cR\x0ccredentialId\"8\n\x20We\
bAuthnRemoveResidentCredential\x12\x14\n\x05index\x18\x01\x20\x01(\rR\
\x05index\"\xe9\x03\n\x13WebAuthnCredentials\x12e\n\x0bcredentials\x18\
\x01\x20\x03(\x0b2C.hw.trezor.messages.webauthn.WebAuthnCredentials.WebA\
uthnCredentialR\x0bcredentials\x1a\xea\x02\n\x12WebAuthnCredential\x12\
\x14\n\x05index\x18\x01\x20\x01(\rR\x05index\x12\x0e\n\x02id\x18\x02\x20\
\x01(\x0cR\x02id\x12\x13\n\x05rp_id\x18\x03\x20\x01(\tR\x04rpId\x12\x17\
\n\x07rp_name\x18\x04\x20\x01(\tR\x06rpName\x12\x17\n\x07user_id\x18\x05\
\x20\x01(\x0cR\x06userId\x12\x1b\n\tuser_name\x18\x06\x20\x01(\tR\x08use\
rName\x12*\n\x11user_display_name\x18\x07\x20\x01(\tR\x0fuserDisplayName\
\x12#\n\rcreation_time\x18\x08\x20\x01(\rR\x0ccreationTime\x12\x1f\n\x0b\
hmac_secret\x18\t\x20\x01(\x08R\nhmacSecret\x12$\n\x0euse_sign_count\x18\
\n\x20\x01(\x08R\x0cuseSignCount\x12\x1c\n\talgorithm\x18\x0b\x20\x01(\
\x11R\talgorithm\x12\x14\n\x05curve\x18\x0c\x20\x01(\x11R\x05curveB<\n#c\
om.satoshilabs.trezor.lib.protobufB\x15TrezorMessageWebAuthn\
";
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()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(0);
let mut messages = ::std::vec::Vec::with_capacity(5);
messages.push(WebAuthnListResidentCredentials::generated_message_descriptor_data());
messages.push(WebAuthnAddResidentCredential::generated_message_descriptor_data());
messages.push(WebAuthnRemoveResidentCredential::generated_message_descriptor_data());
messages.push(WebAuthnCredentials::generated_message_descriptor_data());
messages.push(web_authn_credentials::WebAuthnCredential::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}