authentik_rust/models/
device_classes_enum.rs

1/*
2 * authentik
3 *
4 * Making authentication simple.
5 *
6 * The version of the OpenAPI document: 2024.2.1
7 * Contact: hello@goauthentik.io
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13/// DeviceClassesEnum : * `static` - Static * `totp` - TOTP * `webauthn` - WebAuthn * `duo` - Duo * `sms` - SMS
14/// * `static` - Static * `totp` - TOTP * `webauthn` - WebAuthn * `duo` - Duo * `sms` - SMS
15#[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