Skip to main content

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