1#![allow(unknown_lints)]
7#![allow(clippy::all)]
8
9#![allow(unused_attributes)]
10#![cfg_attr(rustfmt, rustfmt::skip)]
11
12#![allow(box_pointers)]
13#![allow(dead_code)]
14#![allow(missing_docs)]
15#![allow(non_camel_case_types)]
16#![allow(non_snake_case)]
17#![allow(non_upper_case_globals)]
18#![allow(trivial_casts)]
19#![allow(unused_results)]
20#![allow(unused_mut)]
21
22const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_3_0;
27
28#[derive(PartialEq,Clone,Default,Debug)]
30pub struct WebAuthnListResidentCredentials {
31 pub special_fields: ::protobuf::SpecialFields,
34}
35
36impl<'a> ::std::default::Default for &'a WebAuthnListResidentCredentials {
37 fn default() -> &'a WebAuthnListResidentCredentials {
38 <WebAuthnListResidentCredentials as ::protobuf::Message>::default_instance()
39 }
40}
41
42impl WebAuthnListResidentCredentials {
43 pub fn new() -> WebAuthnListResidentCredentials {
44 ::std::default::Default::default()
45 }
46
47 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
48 let mut fields = ::std::vec::Vec::with_capacity(0);
49 let mut oneofs = ::std::vec::Vec::with_capacity(0);
50 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnListResidentCredentials>(
51 "WebAuthnListResidentCredentials",
52 fields,
53 oneofs,
54 )
55 }
56}
57
58impl ::protobuf::Message for WebAuthnListResidentCredentials {
59 const NAME: &'static str = "WebAuthnListResidentCredentials";
60
61 fn is_initialized(&self) -> bool {
62 true
63 }
64
65 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
66 while let Some(tag) = is.read_raw_tag_or_eof()? {
67 match tag {
68 tag => {
69 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
70 },
71 };
72 }
73 ::std::result::Result::Ok(())
74 }
75
76 #[allow(unused_variables)]
78 fn compute_size(&self) -> u64 {
79 let mut my_size = 0;
80 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
81 self.special_fields.cached_size().set(my_size as u32);
82 my_size
83 }
84
85 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
86 os.write_unknown_fields(self.special_fields.unknown_fields())?;
87 ::std::result::Result::Ok(())
88 }
89
90 fn special_fields(&self) -> &::protobuf::SpecialFields {
91 &self.special_fields
92 }
93
94 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
95 &mut self.special_fields
96 }
97
98 fn new() -> WebAuthnListResidentCredentials {
99 WebAuthnListResidentCredentials::new()
100 }
101
102 fn clear(&mut self) {
103 self.special_fields.clear();
104 }
105
106 fn default_instance() -> &'static WebAuthnListResidentCredentials {
107 static instance: WebAuthnListResidentCredentials = WebAuthnListResidentCredentials {
108 special_fields: ::protobuf::SpecialFields::new(),
109 };
110 &instance
111 }
112}
113
114impl ::protobuf::MessageFull for WebAuthnListResidentCredentials {
115 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
116 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
117 descriptor.get(|| file_descriptor().message_by_package_relative_name("WebAuthnListResidentCredentials").unwrap()).clone()
118 }
119}
120
121impl ::std::fmt::Display for WebAuthnListResidentCredentials {
122 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
123 ::protobuf::text_format::fmt(self, f)
124 }
125}
126
127impl ::protobuf::reflect::ProtobufValue for WebAuthnListResidentCredentials {
128 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
129}
130
131#[derive(PartialEq,Clone,Default,Debug)]
133pub struct WebAuthnAddResidentCredential {
134 pub credential_id: ::std::option::Option<::std::vec::Vec<u8>>,
137 pub special_fields: ::protobuf::SpecialFields,
140}
141
142impl<'a> ::std::default::Default for &'a WebAuthnAddResidentCredential {
143 fn default() -> &'a WebAuthnAddResidentCredential {
144 <WebAuthnAddResidentCredential as ::protobuf::Message>::default_instance()
145 }
146}
147
148impl WebAuthnAddResidentCredential {
149 pub fn new() -> WebAuthnAddResidentCredential {
150 ::std::default::Default::default()
151 }
152
153 pub fn credential_id(&self) -> &[u8] {
156 match self.credential_id.as_ref() {
157 Some(v) => v,
158 None => &[],
159 }
160 }
161
162 pub fn clear_credential_id(&mut self) {
163 self.credential_id = ::std::option::Option::None;
164 }
165
166 pub fn has_credential_id(&self) -> bool {
167 self.credential_id.is_some()
168 }
169
170 pub fn set_credential_id(&mut self, v: ::std::vec::Vec<u8>) {
172 self.credential_id = ::std::option::Option::Some(v);
173 }
174
175 pub fn mut_credential_id(&mut self) -> &mut ::std::vec::Vec<u8> {
178 if self.credential_id.is_none() {
179 self.credential_id = ::std::option::Option::Some(::std::vec::Vec::new());
180 }
181 self.credential_id.as_mut().unwrap()
182 }
183
184 pub fn take_credential_id(&mut self) -> ::std::vec::Vec<u8> {
186 self.credential_id.take().unwrap_or_else(|| ::std::vec::Vec::new())
187 }
188
189 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
190 let mut fields = ::std::vec::Vec::with_capacity(1);
191 let mut oneofs = ::std::vec::Vec::with_capacity(0);
192 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
193 "credential_id",
194 |m: &WebAuthnAddResidentCredential| { &m.credential_id },
195 |m: &mut WebAuthnAddResidentCredential| { &mut m.credential_id },
196 ));
197 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnAddResidentCredential>(
198 "WebAuthnAddResidentCredential",
199 fields,
200 oneofs,
201 )
202 }
203}
204
205impl ::protobuf::Message for WebAuthnAddResidentCredential {
206 const NAME: &'static str = "WebAuthnAddResidentCredential";
207
208 fn is_initialized(&self) -> bool {
209 true
210 }
211
212 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
213 while let Some(tag) = is.read_raw_tag_or_eof()? {
214 match tag {
215 10 => {
216 self.credential_id = ::std::option::Option::Some(is.read_bytes()?);
217 },
218 tag => {
219 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
220 },
221 };
222 }
223 ::std::result::Result::Ok(())
224 }
225
226 #[allow(unused_variables)]
228 fn compute_size(&self) -> u64 {
229 let mut my_size = 0;
230 if let Some(v) = self.credential_id.as_ref() {
231 my_size += ::protobuf::rt::bytes_size(1, &v);
232 }
233 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
234 self.special_fields.cached_size().set(my_size as u32);
235 my_size
236 }
237
238 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
239 if let Some(v) = self.credential_id.as_ref() {
240 os.write_bytes(1, v)?;
241 }
242 os.write_unknown_fields(self.special_fields.unknown_fields())?;
243 ::std::result::Result::Ok(())
244 }
245
246 fn special_fields(&self) -> &::protobuf::SpecialFields {
247 &self.special_fields
248 }
249
250 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
251 &mut self.special_fields
252 }
253
254 fn new() -> WebAuthnAddResidentCredential {
255 WebAuthnAddResidentCredential::new()
256 }
257
258 fn clear(&mut self) {
259 self.credential_id = ::std::option::Option::None;
260 self.special_fields.clear();
261 }
262
263 fn default_instance() -> &'static WebAuthnAddResidentCredential {
264 static instance: WebAuthnAddResidentCredential = WebAuthnAddResidentCredential {
265 credential_id: ::std::option::Option::None,
266 special_fields: ::protobuf::SpecialFields::new(),
267 };
268 &instance
269 }
270}
271
272impl ::protobuf::MessageFull for WebAuthnAddResidentCredential {
273 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
274 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
275 descriptor.get(|| file_descriptor().message_by_package_relative_name("WebAuthnAddResidentCredential").unwrap()).clone()
276 }
277}
278
279impl ::std::fmt::Display for WebAuthnAddResidentCredential {
280 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
281 ::protobuf::text_format::fmt(self, f)
282 }
283}
284
285impl ::protobuf::reflect::ProtobufValue for WebAuthnAddResidentCredential {
286 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
287}
288
289#[derive(PartialEq,Clone,Default,Debug)]
291pub struct WebAuthnRemoveResidentCredential {
292 pub index: ::std::option::Option<u32>,
295 pub special_fields: ::protobuf::SpecialFields,
298}
299
300impl<'a> ::std::default::Default for &'a WebAuthnRemoveResidentCredential {
301 fn default() -> &'a WebAuthnRemoveResidentCredential {
302 <WebAuthnRemoveResidentCredential as ::protobuf::Message>::default_instance()
303 }
304}
305
306impl WebAuthnRemoveResidentCredential {
307 pub fn new() -> WebAuthnRemoveResidentCredential {
308 ::std::default::Default::default()
309 }
310
311 pub fn index(&self) -> u32 {
314 self.index.unwrap_or(0)
315 }
316
317 pub fn clear_index(&mut self) {
318 self.index = ::std::option::Option::None;
319 }
320
321 pub fn has_index(&self) -> bool {
322 self.index.is_some()
323 }
324
325 pub fn set_index(&mut self, v: u32) {
327 self.index = ::std::option::Option::Some(v);
328 }
329
330 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
331 let mut fields = ::std::vec::Vec::with_capacity(1);
332 let mut oneofs = ::std::vec::Vec::with_capacity(0);
333 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
334 "index",
335 |m: &WebAuthnRemoveResidentCredential| { &m.index },
336 |m: &mut WebAuthnRemoveResidentCredential| { &mut m.index },
337 ));
338 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnRemoveResidentCredential>(
339 "WebAuthnRemoveResidentCredential",
340 fields,
341 oneofs,
342 )
343 }
344}
345
346impl ::protobuf::Message for WebAuthnRemoveResidentCredential {
347 const NAME: &'static str = "WebAuthnRemoveResidentCredential";
348
349 fn is_initialized(&self) -> bool {
350 true
351 }
352
353 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
354 while let Some(tag) = is.read_raw_tag_or_eof()? {
355 match tag {
356 8 => {
357 self.index = ::std::option::Option::Some(is.read_uint32()?);
358 },
359 tag => {
360 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
361 },
362 };
363 }
364 ::std::result::Result::Ok(())
365 }
366
367 #[allow(unused_variables)]
369 fn compute_size(&self) -> u64 {
370 let mut my_size = 0;
371 if let Some(v) = self.index {
372 my_size += ::protobuf::rt::uint32_size(1, v);
373 }
374 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
375 self.special_fields.cached_size().set(my_size as u32);
376 my_size
377 }
378
379 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
380 if let Some(v) = self.index {
381 os.write_uint32(1, v)?;
382 }
383 os.write_unknown_fields(self.special_fields.unknown_fields())?;
384 ::std::result::Result::Ok(())
385 }
386
387 fn special_fields(&self) -> &::protobuf::SpecialFields {
388 &self.special_fields
389 }
390
391 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
392 &mut self.special_fields
393 }
394
395 fn new() -> WebAuthnRemoveResidentCredential {
396 WebAuthnRemoveResidentCredential::new()
397 }
398
399 fn clear(&mut self) {
400 self.index = ::std::option::Option::None;
401 self.special_fields.clear();
402 }
403
404 fn default_instance() -> &'static WebAuthnRemoveResidentCredential {
405 static instance: WebAuthnRemoveResidentCredential = WebAuthnRemoveResidentCredential {
406 index: ::std::option::Option::None,
407 special_fields: ::protobuf::SpecialFields::new(),
408 };
409 &instance
410 }
411}
412
413impl ::protobuf::MessageFull for WebAuthnRemoveResidentCredential {
414 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
415 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
416 descriptor.get(|| file_descriptor().message_by_package_relative_name("WebAuthnRemoveResidentCredential").unwrap()).clone()
417 }
418}
419
420impl ::std::fmt::Display for WebAuthnRemoveResidentCredential {
421 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
422 ::protobuf::text_format::fmt(self, f)
423 }
424}
425
426impl ::protobuf::reflect::ProtobufValue for WebAuthnRemoveResidentCredential {
427 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
428}
429
430#[derive(PartialEq,Clone,Default,Debug)]
432pub struct WebAuthnCredentials {
433 pub credentials: ::std::vec::Vec<web_authn_credentials::WebAuthnCredential>,
436 pub special_fields: ::protobuf::SpecialFields,
439}
440
441impl<'a> ::std::default::Default for &'a WebAuthnCredentials {
442 fn default() -> &'a WebAuthnCredentials {
443 <WebAuthnCredentials as ::protobuf::Message>::default_instance()
444 }
445}
446
447impl WebAuthnCredentials {
448 pub fn new() -> WebAuthnCredentials {
449 ::std::default::Default::default()
450 }
451
452 fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
453 let mut fields = ::std::vec::Vec::with_capacity(1);
454 let mut oneofs = ::std::vec::Vec::with_capacity(0);
455 fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
456 "credentials",
457 |m: &WebAuthnCredentials| { &m.credentials },
458 |m: &mut WebAuthnCredentials| { &mut m.credentials },
459 ));
460 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnCredentials>(
461 "WebAuthnCredentials",
462 fields,
463 oneofs,
464 )
465 }
466}
467
468impl ::protobuf::Message for WebAuthnCredentials {
469 const NAME: &'static str = "WebAuthnCredentials";
470
471 fn is_initialized(&self) -> bool {
472 true
473 }
474
475 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
476 while let Some(tag) = is.read_raw_tag_or_eof()? {
477 match tag {
478 10 => {
479 self.credentials.push(is.read_message()?);
480 },
481 tag => {
482 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
483 },
484 };
485 }
486 ::std::result::Result::Ok(())
487 }
488
489 #[allow(unused_variables)]
491 fn compute_size(&self) -> u64 {
492 let mut my_size = 0;
493 for value in &self.credentials {
494 let len = value.compute_size();
495 my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
496 };
497 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
498 self.special_fields.cached_size().set(my_size as u32);
499 my_size
500 }
501
502 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
503 for v in &self.credentials {
504 ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?;
505 };
506 os.write_unknown_fields(self.special_fields.unknown_fields())?;
507 ::std::result::Result::Ok(())
508 }
509
510 fn special_fields(&self) -> &::protobuf::SpecialFields {
511 &self.special_fields
512 }
513
514 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
515 &mut self.special_fields
516 }
517
518 fn new() -> WebAuthnCredentials {
519 WebAuthnCredentials::new()
520 }
521
522 fn clear(&mut self) {
523 self.credentials.clear();
524 self.special_fields.clear();
525 }
526
527 fn default_instance() -> &'static WebAuthnCredentials {
528 static instance: WebAuthnCredentials = WebAuthnCredentials {
529 credentials: ::std::vec::Vec::new(),
530 special_fields: ::protobuf::SpecialFields::new(),
531 };
532 &instance
533 }
534}
535
536impl ::protobuf::MessageFull for WebAuthnCredentials {
537 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
538 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
539 descriptor.get(|| file_descriptor().message_by_package_relative_name("WebAuthnCredentials").unwrap()).clone()
540 }
541}
542
543impl ::std::fmt::Display for WebAuthnCredentials {
544 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
545 ::protobuf::text_format::fmt(self, f)
546 }
547}
548
549impl ::protobuf::reflect::ProtobufValue for WebAuthnCredentials {
550 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
551}
552
553pub mod web_authn_credentials {
555 #[derive(PartialEq,Clone,Default,Debug)]
557 pub struct WebAuthnCredential {
558 pub index: ::std::option::Option<u32>,
561 pub id: ::std::option::Option<::std::vec::Vec<u8>>,
563 pub rp_id: ::std::option::Option<::std::string::String>,
565 pub rp_name: ::std::option::Option<::std::string::String>,
567 pub user_id: ::std::option::Option<::std::vec::Vec<u8>>,
569 pub user_name: ::std::option::Option<::std::string::String>,
571 pub user_display_name: ::std::option::Option<::std::string::String>,
573 pub creation_time: ::std::option::Option<u32>,
575 pub hmac_secret: ::std::option::Option<bool>,
577 pub use_sign_count: ::std::option::Option<bool>,
579 pub algorithm: ::std::option::Option<i32>,
581 pub curve: ::std::option::Option<i32>,
583 pub special_fields: ::protobuf::SpecialFields,
586 }
587
588 impl<'a> ::std::default::Default for &'a WebAuthnCredential {
589 fn default() -> &'a WebAuthnCredential {
590 <WebAuthnCredential as ::protobuf::Message>::default_instance()
591 }
592 }
593
594 impl WebAuthnCredential {
595 pub fn new() -> WebAuthnCredential {
596 ::std::default::Default::default()
597 }
598
599 pub fn index(&self) -> u32 {
602 self.index.unwrap_or(0)
603 }
604
605 pub fn clear_index(&mut self) {
606 self.index = ::std::option::Option::None;
607 }
608
609 pub fn has_index(&self) -> bool {
610 self.index.is_some()
611 }
612
613 pub fn set_index(&mut self, v: u32) {
615 self.index = ::std::option::Option::Some(v);
616 }
617
618 pub fn id(&self) -> &[u8] {
621 match self.id.as_ref() {
622 Some(v) => v,
623 None => &[],
624 }
625 }
626
627 pub fn clear_id(&mut self) {
628 self.id = ::std::option::Option::None;
629 }
630
631 pub fn has_id(&self) -> bool {
632 self.id.is_some()
633 }
634
635 pub fn set_id(&mut self, v: ::std::vec::Vec<u8>) {
637 self.id = ::std::option::Option::Some(v);
638 }
639
640 pub fn mut_id(&mut self) -> &mut ::std::vec::Vec<u8> {
643 if self.id.is_none() {
644 self.id = ::std::option::Option::Some(::std::vec::Vec::new());
645 }
646 self.id.as_mut().unwrap()
647 }
648
649 pub fn take_id(&mut self) -> ::std::vec::Vec<u8> {
651 self.id.take().unwrap_or_else(|| ::std::vec::Vec::new())
652 }
653
654 pub fn rp_id(&self) -> &str {
657 match self.rp_id.as_ref() {
658 Some(v) => v,
659 None => "",
660 }
661 }
662
663 pub fn clear_rp_id(&mut self) {
664 self.rp_id = ::std::option::Option::None;
665 }
666
667 pub fn has_rp_id(&self) -> bool {
668 self.rp_id.is_some()
669 }
670
671 pub fn set_rp_id(&mut self, v: ::std::string::String) {
673 self.rp_id = ::std::option::Option::Some(v);
674 }
675
676 pub fn mut_rp_id(&mut self) -> &mut ::std::string::String {
679 if self.rp_id.is_none() {
680 self.rp_id = ::std::option::Option::Some(::std::string::String::new());
681 }
682 self.rp_id.as_mut().unwrap()
683 }
684
685 pub fn take_rp_id(&mut self) -> ::std::string::String {
687 self.rp_id.take().unwrap_or_else(|| ::std::string::String::new())
688 }
689
690 pub fn rp_name(&self) -> &str {
693 match self.rp_name.as_ref() {
694 Some(v) => v,
695 None => "",
696 }
697 }
698
699 pub fn clear_rp_name(&mut self) {
700 self.rp_name = ::std::option::Option::None;
701 }
702
703 pub fn has_rp_name(&self) -> bool {
704 self.rp_name.is_some()
705 }
706
707 pub fn set_rp_name(&mut self, v: ::std::string::String) {
709 self.rp_name = ::std::option::Option::Some(v);
710 }
711
712 pub fn mut_rp_name(&mut self) -> &mut ::std::string::String {
715 if self.rp_name.is_none() {
716 self.rp_name = ::std::option::Option::Some(::std::string::String::new());
717 }
718 self.rp_name.as_mut().unwrap()
719 }
720
721 pub fn take_rp_name(&mut self) -> ::std::string::String {
723 self.rp_name.take().unwrap_or_else(|| ::std::string::String::new())
724 }
725
726 pub fn user_id(&self) -> &[u8] {
729 match self.user_id.as_ref() {
730 Some(v) => v,
731 None => &[],
732 }
733 }
734
735 pub fn clear_user_id(&mut self) {
736 self.user_id = ::std::option::Option::None;
737 }
738
739 pub fn has_user_id(&self) -> bool {
740 self.user_id.is_some()
741 }
742
743 pub fn set_user_id(&mut self, v: ::std::vec::Vec<u8>) {
745 self.user_id = ::std::option::Option::Some(v);
746 }
747
748 pub fn mut_user_id(&mut self) -> &mut ::std::vec::Vec<u8> {
751 if self.user_id.is_none() {
752 self.user_id = ::std::option::Option::Some(::std::vec::Vec::new());
753 }
754 self.user_id.as_mut().unwrap()
755 }
756
757 pub fn take_user_id(&mut self) -> ::std::vec::Vec<u8> {
759 self.user_id.take().unwrap_or_else(|| ::std::vec::Vec::new())
760 }
761
762 pub fn user_name(&self) -> &str {
765 match self.user_name.as_ref() {
766 Some(v) => v,
767 None => "",
768 }
769 }
770
771 pub fn clear_user_name(&mut self) {
772 self.user_name = ::std::option::Option::None;
773 }
774
775 pub fn has_user_name(&self) -> bool {
776 self.user_name.is_some()
777 }
778
779 pub fn set_user_name(&mut self, v: ::std::string::String) {
781 self.user_name = ::std::option::Option::Some(v);
782 }
783
784 pub fn mut_user_name(&mut self) -> &mut ::std::string::String {
787 if self.user_name.is_none() {
788 self.user_name = ::std::option::Option::Some(::std::string::String::new());
789 }
790 self.user_name.as_mut().unwrap()
791 }
792
793 pub fn take_user_name(&mut self) -> ::std::string::String {
795 self.user_name.take().unwrap_or_else(|| ::std::string::String::new())
796 }
797
798 pub fn user_display_name(&self) -> &str {
801 match self.user_display_name.as_ref() {
802 Some(v) => v,
803 None => "",
804 }
805 }
806
807 pub fn clear_user_display_name(&mut self) {
808 self.user_display_name = ::std::option::Option::None;
809 }
810
811 pub fn has_user_display_name(&self) -> bool {
812 self.user_display_name.is_some()
813 }
814
815 pub fn set_user_display_name(&mut self, v: ::std::string::String) {
817 self.user_display_name = ::std::option::Option::Some(v);
818 }
819
820 pub fn mut_user_display_name(&mut self) -> &mut ::std::string::String {
823 if self.user_display_name.is_none() {
824 self.user_display_name = ::std::option::Option::Some(::std::string::String::new());
825 }
826 self.user_display_name.as_mut().unwrap()
827 }
828
829 pub fn take_user_display_name(&mut self) -> ::std::string::String {
831 self.user_display_name.take().unwrap_or_else(|| ::std::string::String::new())
832 }
833
834 pub fn creation_time(&self) -> u32 {
837 self.creation_time.unwrap_or(0)
838 }
839
840 pub fn clear_creation_time(&mut self) {
841 self.creation_time = ::std::option::Option::None;
842 }
843
844 pub fn has_creation_time(&self) -> bool {
845 self.creation_time.is_some()
846 }
847
848 pub fn set_creation_time(&mut self, v: u32) {
850 self.creation_time = ::std::option::Option::Some(v);
851 }
852
853 pub fn hmac_secret(&self) -> bool {
856 self.hmac_secret.unwrap_or(false)
857 }
858
859 pub fn clear_hmac_secret(&mut self) {
860 self.hmac_secret = ::std::option::Option::None;
861 }
862
863 pub fn has_hmac_secret(&self) -> bool {
864 self.hmac_secret.is_some()
865 }
866
867 pub fn set_hmac_secret(&mut self, v: bool) {
869 self.hmac_secret = ::std::option::Option::Some(v);
870 }
871
872 pub fn use_sign_count(&self) -> bool {
875 self.use_sign_count.unwrap_or(false)
876 }
877
878 pub fn clear_use_sign_count(&mut self) {
879 self.use_sign_count = ::std::option::Option::None;
880 }
881
882 pub fn has_use_sign_count(&self) -> bool {
883 self.use_sign_count.is_some()
884 }
885
886 pub fn set_use_sign_count(&mut self, v: bool) {
888 self.use_sign_count = ::std::option::Option::Some(v);
889 }
890
891 pub fn algorithm(&self) -> i32 {
894 self.algorithm.unwrap_or(0)
895 }
896
897 pub fn clear_algorithm(&mut self) {
898 self.algorithm = ::std::option::Option::None;
899 }
900
901 pub fn has_algorithm(&self) -> bool {
902 self.algorithm.is_some()
903 }
904
905 pub fn set_algorithm(&mut self, v: i32) {
907 self.algorithm = ::std::option::Option::Some(v);
908 }
909
910 pub fn curve(&self) -> i32 {
913 self.curve.unwrap_or(0)
914 }
915
916 pub fn clear_curve(&mut self) {
917 self.curve = ::std::option::Option::None;
918 }
919
920 pub fn has_curve(&self) -> bool {
921 self.curve.is_some()
922 }
923
924 pub fn set_curve(&mut self, v: i32) {
926 self.curve = ::std::option::Option::Some(v);
927 }
928
929 pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
930 let mut fields = ::std::vec::Vec::with_capacity(12);
931 let mut oneofs = ::std::vec::Vec::with_capacity(0);
932 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
933 "index",
934 |m: &WebAuthnCredential| { &m.index },
935 |m: &mut WebAuthnCredential| { &mut m.index },
936 ));
937 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
938 "id",
939 |m: &WebAuthnCredential| { &m.id },
940 |m: &mut WebAuthnCredential| { &mut m.id },
941 ));
942 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
943 "rp_id",
944 |m: &WebAuthnCredential| { &m.rp_id },
945 |m: &mut WebAuthnCredential| { &mut m.rp_id },
946 ));
947 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
948 "rp_name",
949 |m: &WebAuthnCredential| { &m.rp_name },
950 |m: &mut WebAuthnCredential| { &mut m.rp_name },
951 ));
952 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
953 "user_id",
954 |m: &WebAuthnCredential| { &m.user_id },
955 |m: &mut WebAuthnCredential| { &mut m.user_id },
956 ));
957 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
958 "user_name",
959 |m: &WebAuthnCredential| { &m.user_name },
960 |m: &mut WebAuthnCredential| { &mut m.user_name },
961 ));
962 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
963 "user_display_name",
964 |m: &WebAuthnCredential| { &m.user_display_name },
965 |m: &mut WebAuthnCredential| { &mut m.user_display_name },
966 ));
967 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
968 "creation_time",
969 |m: &WebAuthnCredential| { &m.creation_time },
970 |m: &mut WebAuthnCredential| { &mut m.creation_time },
971 ));
972 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
973 "hmac_secret",
974 |m: &WebAuthnCredential| { &m.hmac_secret },
975 |m: &mut WebAuthnCredential| { &mut m.hmac_secret },
976 ));
977 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
978 "use_sign_count",
979 |m: &WebAuthnCredential| { &m.use_sign_count },
980 |m: &mut WebAuthnCredential| { &mut m.use_sign_count },
981 ));
982 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
983 "algorithm",
984 |m: &WebAuthnCredential| { &m.algorithm },
985 |m: &mut WebAuthnCredential| { &mut m.algorithm },
986 ));
987 fields.push(::protobuf::reflect::rt::v2::make_option_accessor::<_, _>(
988 "curve",
989 |m: &WebAuthnCredential| { &m.curve },
990 |m: &mut WebAuthnCredential| { &mut m.curve },
991 ));
992 ::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<WebAuthnCredential>(
993 "WebAuthnCredentials.WebAuthnCredential",
994 fields,
995 oneofs,
996 )
997 }
998 }
999
1000 impl ::protobuf::Message for WebAuthnCredential {
1001 const NAME: &'static str = "WebAuthnCredential";
1002
1003 fn is_initialized(&self) -> bool {
1004 true
1005 }
1006
1007 fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
1008 while let Some(tag) = is.read_raw_tag_or_eof()? {
1009 match tag {
1010 8 => {
1011 self.index = ::std::option::Option::Some(is.read_uint32()?);
1012 },
1013 18 => {
1014 self.id = ::std::option::Option::Some(is.read_bytes()?);
1015 },
1016 26 => {
1017 self.rp_id = ::std::option::Option::Some(is.read_string()?);
1018 },
1019 34 => {
1020 self.rp_name = ::std::option::Option::Some(is.read_string()?);
1021 },
1022 42 => {
1023 self.user_id = ::std::option::Option::Some(is.read_bytes()?);
1024 },
1025 50 => {
1026 self.user_name = ::std::option::Option::Some(is.read_string()?);
1027 },
1028 58 => {
1029 self.user_display_name = ::std::option::Option::Some(is.read_string()?);
1030 },
1031 64 => {
1032 self.creation_time = ::std::option::Option::Some(is.read_uint32()?);
1033 },
1034 72 => {
1035 self.hmac_secret = ::std::option::Option::Some(is.read_bool()?);
1036 },
1037 80 => {
1038 self.use_sign_count = ::std::option::Option::Some(is.read_bool()?);
1039 },
1040 88 => {
1041 self.algorithm = ::std::option::Option::Some(is.read_sint32()?);
1042 },
1043 96 => {
1044 self.curve = ::std::option::Option::Some(is.read_sint32()?);
1045 },
1046 tag => {
1047 ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
1048 },
1049 };
1050 }
1051 ::std::result::Result::Ok(())
1052 }
1053
1054 #[allow(unused_variables)]
1056 fn compute_size(&self) -> u64 {
1057 let mut my_size = 0;
1058 if let Some(v) = self.index {
1059 my_size += ::protobuf::rt::uint32_size(1, v);
1060 }
1061 if let Some(v) = self.id.as_ref() {
1062 my_size += ::protobuf::rt::bytes_size(2, &v);
1063 }
1064 if let Some(v) = self.rp_id.as_ref() {
1065 my_size += ::protobuf::rt::string_size(3, &v);
1066 }
1067 if let Some(v) = self.rp_name.as_ref() {
1068 my_size += ::protobuf::rt::string_size(4, &v);
1069 }
1070 if let Some(v) = self.user_id.as_ref() {
1071 my_size += ::protobuf::rt::bytes_size(5, &v);
1072 }
1073 if let Some(v) = self.user_name.as_ref() {
1074 my_size += ::protobuf::rt::string_size(6, &v);
1075 }
1076 if let Some(v) = self.user_display_name.as_ref() {
1077 my_size += ::protobuf::rt::string_size(7, &v);
1078 }
1079 if let Some(v) = self.creation_time {
1080 my_size += ::protobuf::rt::uint32_size(8, v);
1081 }
1082 if let Some(v) = self.hmac_secret {
1083 my_size += 1 + 1;
1084 }
1085 if let Some(v) = self.use_sign_count {
1086 my_size += 1 + 1;
1087 }
1088 if let Some(v) = self.algorithm {
1089 my_size += ::protobuf::rt::sint32_size(11, v);
1090 }
1091 if let Some(v) = self.curve {
1092 my_size += ::protobuf::rt::sint32_size(12, v);
1093 }
1094 my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
1095 self.special_fields.cached_size().set(my_size as u32);
1096 my_size
1097 }
1098
1099 fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
1100 if let Some(v) = self.index {
1101 os.write_uint32(1, v)?;
1102 }
1103 if let Some(v) = self.id.as_ref() {
1104 os.write_bytes(2, v)?;
1105 }
1106 if let Some(v) = self.rp_id.as_ref() {
1107 os.write_string(3, v)?;
1108 }
1109 if let Some(v) = self.rp_name.as_ref() {
1110 os.write_string(4, v)?;
1111 }
1112 if let Some(v) = self.user_id.as_ref() {
1113 os.write_bytes(5, v)?;
1114 }
1115 if let Some(v) = self.user_name.as_ref() {
1116 os.write_string(6, v)?;
1117 }
1118 if let Some(v) = self.user_display_name.as_ref() {
1119 os.write_string(7, v)?;
1120 }
1121 if let Some(v) = self.creation_time {
1122 os.write_uint32(8, v)?;
1123 }
1124 if let Some(v) = self.hmac_secret {
1125 os.write_bool(9, v)?;
1126 }
1127 if let Some(v) = self.use_sign_count {
1128 os.write_bool(10, v)?;
1129 }
1130 if let Some(v) = self.algorithm {
1131 os.write_sint32(11, v)?;
1132 }
1133 if let Some(v) = self.curve {
1134 os.write_sint32(12, v)?;
1135 }
1136 os.write_unknown_fields(self.special_fields.unknown_fields())?;
1137 ::std::result::Result::Ok(())
1138 }
1139
1140 fn special_fields(&self) -> &::protobuf::SpecialFields {
1141 &self.special_fields
1142 }
1143
1144 fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
1145 &mut self.special_fields
1146 }
1147
1148 fn new() -> WebAuthnCredential {
1149 WebAuthnCredential::new()
1150 }
1151
1152 fn clear(&mut self) {
1153 self.index = ::std::option::Option::None;
1154 self.id = ::std::option::Option::None;
1155 self.rp_id = ::std::option::Option::None;
1156 self.rp_name = ::std::option::Option::None;
1157 self.user_id = ::std::option::Option::None;
1158 self.user_name = ::std::option::Option::None;
1159 self.user_display_name = ::std::option::Option::None;
1160 self.creation_time = ::std::option::Option::None;
1161 self.hmac_secret = ::std::option::Option::None;
1162 self.use_sign_count = ::std::option::Option::None;
1163 self.algorithm = ::std::option::Option::None;
1164 self.curve = ::std::option::Option::None;
1165 self.special_fields.clear();
1166 }
1167
1168 fn default_instance() -> &'static WebAuthnCredential {
1169 static instance: WebAuthnCredential = WebAuthnCredential {
1170 index: ::std::option::Option::None,
1171 id: ::std::option::Option::None,
1172 rp_id: ::std::option::Option::None,
1173 rp_name: ::std::option::Option::None,
1174 user_id: ::std::option::Option::None,
1175 user_name: ::std::option::Option::None,
1176 user_display_name: ::std::option::Option::None,
1177 creation_time: ::std::option::Option::None,
1178 hmac_secret: ::std::option::Option::None,
1179 use_sign_count: ::std::option::Option::None,
1180 algorithm: ::std::option::Option::None,
1181 curve: ::std::option::Option::None,
1182 special_fields: ::protobuf::SpecialFields::new(),
1183 };
1184 &instance
1185 }
1186 }
1187
1188 impl ::protobuf::MessageFull for WebAuthnCredential {
1189 fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
1190 static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
1191 descriptor.get(|| super::file_descriptor().message_by_package_relative_name("WebAuthnCredentials.WebAuthnCredential").unwrap()).clone()
1192 }
1193 }
1194
1195 impl ::std::fmt::Display for WebAuthnCredential {
1196 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1197 ::protobuf::text_format::fmt(self, f)
1198 }
1199 }
1200
1201 impl ::protobuf::reflect::ProtobufValue for WebAuthnCredential {
1202 type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
1203 }
1204}
1205
1206static file_descriptor_proto_data: &'static [u8] = b"\
1207 \n\x17messages-webauthn.proto\x12\x1bhw.trezor.messages.webauthn\"!\n\
1208 \x1fWebAuthnListResidentCredentials\"D\n\x1dWebAuthnAddResidentCredentia\
1209 l\x12#\n\rcredential_id\x18\x01\x20\x01(\x0cR\x0ccredentialId\"8\n\x20We\
1210 bAuthnRemoveResidentCredential\x12\x14\n\x05index\x18\x01\x20\x01(\rR\
1211 \x05index\"\xe9\x03\n\x13WebAuthnCredentials\x12e\n\x0bcredentials\x18\
1212 \x01\x20\x03(\x0b2C.hw.trezor.messages.webauthn.WebAuthnCredentials.WebA\
1213 uthnCredentialR\x0bcredentials\x1a\xea\x02\n\x12WebAuthnCredential\x12\
1214 \x14\n\x05index\x18\x01\x20\x01(\rR\x05index\x12\x0e\n\x02id\x18\x02\x20\
1215 \x01(\x0cR\x02id\x12\x13\n\x05rp_id\x18\x03\x20\x01(\tR\x04rpId\x12\x17\
1216 \n\x07rp_name\x18\x04\x20\x01(\tR\x06rpName\x12\x17\n\x07user_id\x18\x05\
1217 \x20\x01(\x0cR\x06userId\x12\x1b\n\tuser_name\x18\x06\x20\x01(\tR\x08use\
1218 rName\x12*\n\x11user_display_name\x18\x07\x20\x01(\tR\x0fuserDisplayName\
1219 \x12#\n\rcreation_time\x18\x08\x20\x01(\rR\x0ccreationTime\x12\x1f\n\x0b\
1220 hmac_secret\x18\t\x20\x01(\x08R\nhmacSecret\x12$\n\x0euse_sign_count\x18\
1221 \n\x20\x01(\x08R\x0cuseSignCount\x12\x1c\n\talgorithm\x18\x0b\x20\x01(\
1222 \x11R\talgorithm\x12\x14\n\x05curve\x18\x0c\x20\x01(\x11R\x05curveB<\n#c\
1223 om.satoshilabs.trezor.lib.protobufB\x15TrezorMessageWebAuthn\
1224";
1225
1226fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
1228 static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
1229 file_descriptor_proto_lazy.get(|| {
1230 ::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
1231 })
1232}
1233
1234pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
1236 static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
1237 static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
1238 file_descriptor.get(|| {
1239 let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
1240 let mut deps = ::std::vec::Vec::with_capacity(0);
1241 let mut messages = ::std::vec::Vec::with_capacity(5);
1242 messages.push(WebAuthnListResidentCredentials::generated_message_descriptor_data());
1243 messages.push(WebAuthnAddResidentCredential::generated_message_descriptor_data());
1244 messages.push(WebAuthnRemoveResidentCredential::generated_message_descriptor_data());
1245 messages.push(WebAuthnCredentials::generated_message_descriptor_data());
1246 messages.push(web_authn_credentials::WebAuthnCredential::generated_message_descriptor_data());
1247 let mut enums = ::std::vec::Vec::with_capacity(0);
1248 ::protobuf::reflect::GeneratedFileDescriptor::new_generated(
1249 file_descriptor_proto(),
1250 deps,
1251 messages,
1252 enums,
1253 )
1254 });
1255 ::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
1256 })
1257}