authentik_rust/models/
device_classes_enum.rs1use crate::models;
12
13#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum DeviceClassesEnum {
17 #[serde(rename = "static")]
18 Static,
19 #[serde(rename = "totp")]
20 Totp,
21 #[serde(rename = "webauthn")]
22 Webauthn,
23 #[serde(rename = "duo")]
24 Duo,
25 #[serde(rename = "sms")]
26 Sms,
27
28}
29
30impl ToString for DeviceClassesEnum {
31 fn to_string(&self) -> String {
32 match self {
33 Self::Static => String::from("static"),
34 Self::Totp => String::from("totp"),
35 Self::Webauthn => String::from("webauthn"),
36 Self::Duo => String::from("duo"),
37 Self::Sms => String::from("sms"),
38 }
39 }
40}
41
42impl Default for DeviceClassesEnum {
43 fn default() -> DeviceClassesEnum {
44 Self::Static
45 }
46}
47