authentik_rust/models/
severity_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/// SeverityEnum : * `notice` - Notice * `warning` - Warning * `alert` - Alert
14/// * `notice` - Notice * `warning` - Warning * `alert` - Alert
15#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
16pub enum SeverityEnum {
17    #[serde(rename = "notice")]
18    Notice,
19    #[serde(rename = "warning")]
20    Warning,
21    #[serde(rename = "alert")]
22    Alert,
23
24}
25
26impl ToString for SeverityEnum {
27    fn to_string(&self) -> String {
28        match self {
29            Self::Notice => String::from("notice"),
30            Self::Warning => String::from("warning"),
31            Self::Alert => String::from("alert"),
32        }
33    }
34}
35
36impl Default for SeverityEnum {
37    fn default() -> SeverityEnum {
38        Self::Notice
39    }
40}
41