Skip to main content

nautobot_openapi/models/
log_level_enum.rs

1/*
2 * API Documentation
3 *
4 * Source of truth and network automation platform
5 *
6 * The version of the OpenAPI document: 3.1.0 (3.1)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11///
12#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
13pub enum LogLevelEnum {
14    #[serde(rename = "debug")]
15    Debug,
16    #[serde(rename = "info")]
17    Info,
18    #[serde(rename = "success")]
19    Success,
20    #[serde(rename = "warning")]
21    Warning,
22    #[serde(rename = "failure")]
23    Failure,
24    #[serde(rename = "error")]
25    Error,
26    #[serde(rename = "critical")]
27    Critical,
28}
29
30impl ToString for LogLevelEnum {
31    fn to_string(&self) -> String {
32        match self {
33            Self::Debug => String::from("debug"),
34            Self::Info => String::from("info"),
35            Self::Success => String::from("success"),
36            Self::Warning => String::from("warning"),
37            Self::Failure => String::from("failure"),
38            Self::Error => String::from("error"),
39            Self::Critical => String::from("critical"),
40        }
41    }
42}
43
44impl Default for LogLevelEnum {
45    fn default() -> LogLevelEnum {
46        Self::Debug
47    }
48}