authentik_rust/models/digits_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/// DigitsEnum : * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator
14/// * `6` - 6 digits, widely compatible * `8` - 8 digits, not compatible with apps like Google Authenticator
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum DigitsEnum {
17 #[serde(rename = "6")]
18 Variant6,
19 #[serde(rename = "8")]
20 Variant8,
21
22}
23
24impl ToString for DigitsEnum {
25 fn to_string(&self) -> String {
26 match self {
27 Self::Variant6 => String::from("6"),
28 Self::Variant8 => String::from("8"),
29 }
30 }
31}
32
33impl Default for DigitsEnum {
34 fn default() -> DigitsEnum {
35 Self::Variant6
36 }
37}
38