Skip to main content

nautobot_openapi/models/
button_class_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 ButtonClassEnum {
14    #[serde(rename = "default")]
15    Default,
16    #[serde(rename = "primary")]
17    Primary,
18    #[serde(rename = "success")]
19    Success,
20    #[serde(rename = "info")]
21    Info,
22    #[serde(rename = "warning")]
23    Warning,
24    #[serde(rename = "danger")]
25    Danger,
26    #[serde(rename = "link")]
27    Link,
28}
29
30impl ToString for ButtonClassEnum {
31    fn to_string(&self) -> String {
32        match self {
33            Self::Default => String::from("default"),
34            Self::Primary => String::from("primary"),
35            Self::Success => String::from("success"),
36            Self::Info => String::from("info"),
37            Self::Warning => String::from("warning"),
38            Self::Danger => String::from("danger"),
39            Self::Link => String::from("link"),
40        }
41    }
42}
43
44impl Default for ButtonClassEnum {
45    fn default() -> ButtonClassEnum {
46        Self::Default
47    }
48}