Skip to main content

bitwarden_api_identity/models/
authenticator_transport.rs

1/*
2 * Bitwarden Identity
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15///
16#[derive(Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
17pub enum AuthenticatorTransport {
18    #[serde(rename = "usb")]
19    Usb,
20    #[serde(rename = "nfc")]
21    Nfc,
22    #[serde(rename = "ble")]
23    Ble,
24    #[serde(rename = "smart-card")]
25    SmartCard,
26    #[serde(rename = "hybrid")]
27    Hybrid,
28    #[serde(rename = "internal")]
29    Internal,
30
31    /// Unknown value returned from the server. This is used to handle forward compatibility.
32    #[serde(untagged)]
33    __Unknown(String),
34}
35
36impl std::fmt::Display for AuthenticatorTransport {
37    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
38        match self {
39            Self::Usb => write!(f, "usb"),
40            Self::Nfc => write!(f, "nfc"),
41            Self::Ble => write!(f, "ble"),
42            Self::SmartCard => write!(f, "smart-card"),
43            Self::Hybrid => write!(f, "hybrid"),
44            Self::Internal => write!(f, "internal"),
45            Self::__Unknown(s) => write!(f, "{}", s),
46        }
47    }
48}
49
50impl Default for AuthenticatorTransport {
51    fn default() -> AuthenticatorTransport {
52        Self::Usb
53    }
54}