netbox_openapi/models/
rack_width.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 RackWidth {
13    /// * `10` - 10 inches * `19` - 19 inches * `21` - 21 inches * `23` - 23 inches
14    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15    pub value: Option<i32>,
16    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
17    pub label: Option<Label>,
18}
19
20impl RackWidth {
21    pub fn new() -> RackWidth {
22        RackWidth {
23            value: None,
24            label: None,
25        }
26    }
27}
28
29///
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Label {
32    #[serde(rename = "10 inches")]
33    Variant10Inches,
34    #[serde(rename = "19 inches")]
35    Variant19Inches,
36    #[serde(rename = "21 inches")]
37    Variant21Inches,
38    #[serde(rename = "23 inches")]
39    Variant23Inches,
40}
41
42impl Default for Label {
43    fn default() -> Label {
44        Self::Variant10Inches
45    }
46}