netbox_openapi/models/
cluster_status.rs

1/*
2 * NetBox REST API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 4.4.2-Docker-3.4.1 (4.4)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct ClusterStatus {
13    /// * `planned` - Planned * `staging` - Staging * `active` - Active * `decommissioning` - Decommissioning * `offline` - Offline
14    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15    pub value: Option<Value>,
16    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
17    pub label: Option<Label>,
18}
19
20impl ClusterStatus {
21    pub fn new() -> ClusterStatus {
22        ClusterStatus {
23            value: None,
24            label: None,
25        }
26    }
27}
28
29/// * `planned` - Planned * `staging` - Staging * `active` - Active * `decommissioning` - Decommissioning * `offline` - Offline
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32    #[serde(rename = "planned")]
33    Planned,
34    #[serde(rename = "staging")]
35    Staging,
36    #[serde(rename = "active")]
37    Active,
38    #[serde(rename = "decommissioning")]
39    Decommissioning,
40    #[serde(rename = "offline")]
41    Offline,
42}
43
44impl Default for Value {
45    fn default() -> Value {
46        Self::Planned
47    }
48}
49///
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum Label {
52    #[serde(rename = "Planned")]
53    Planned,
54    #[serde(rename = "Staging")]
55    Staging,
56    #[serde(rename = "Active")]
57    Active,
58    #[serde(rename = "Decommissioning")]
59    Decommissioning,
60    #[serde(rename = "Offline")]
61    Offline,
62}
63
64impl Default for Label {
65    fn default() -> Label {
66        Self::Planned
67    }
68}