bitwarden_api_api/models/
device_type.rsuse serde::{Deserialize, Serialize};
use crate::models;
#[repr(i64)]
#[derive(
Clone,
Copy,
Debug,
Eq,
PartialEq,
Ord,
PartialOrd,
Hash,
serde_repr::Serialize_repr,
serde_repr::Deserialize_repr,
)]
pub enum DeviceType {
Android = 0,
iOS = 1,
ChromeExtension = 2,
FirefoxExtension = 3,
OperaExtension = 4,
EdgeExtension = 5,
WindowsDesktop = 6,
MacOsDesktop = 7,
LinuxDesktop = 8,
ChromeBrowser = 9,
FirefoxBrowser = 10,
OperaBrowser = 11,
EdgeBrowser = 12,
IEBrowser = 13,
UnknownBrowser = 14,
AndroidAmazon = 15,
UWP = 16,
SafariBrowser = 17,
VivaldiBrowser = 18,
VivaldiExtension = 19,
SafariExtension = 20,
SDK = 21,
Server = 22,
WindowsCLI = 23,
MacOsCLI = 24,
LinuxCLI = 25,
}
impl std::fmt::Display for DeviceType {
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
match self {
Self::Android => write!(f, "0"),
Self::iOS => write!(f, "1"),
Self::ChromeExtension => write!(f, "2"),
Self::FirefoxExtension => write!(f, "3"),
Self::OperaExtension => write!(f, "4"),
Self::EdgeExtension => write!(f, "5"),
Self::WindowsDesktop => write!(f, "6"),
Self::MacOsDesktop => write!(f, "7"),
Self::LinuxDesktop => write!(f, "8"),
Self::ChromeBrowser => write!(f, "9"),
Self::FirefoxBrowser => write!(f, "10"),
Self::OperaBrowser => write!(f, "11"),
Self::EdgeBrowser => write!(f, "12"),
Self::IEBrowser => write!(f, "13"),
Self::UnknownBrowser => write!(f, "14"),
Self::AndroidAmazon => write!(f, "15"),
Self::UWP => write!(f, "16"),
Self::SafariBrowser => write!(f, "17"),
Self::VivaldiBrowser => write!(f, "18"),
Self::VivaldiExtension => write!(f, "19"),
Self::SafariExtension => write!(f, "20"),
Self::SDK => write!(f, "21"),
Self::Server => write!(f, "22"),
Self::WindowsCLI => write!(f, "23"),
Self::MacOsCLI => write!(f, "24"),
Self::LinuxCLI => write!(f, "25"),
}
}
}
impl Default for DeviceType {
fn default() -> DeviceType {
Self::Android
}
}