Skip to main content

nautobot_openapi/models/
rack_unit.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/// RackUnit : A rack unit is an abstraction formed by the set (rack, position, face); it does not exist as a row in the database.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct RackUnit {
15    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
16    pub id: Option<i32>,
17    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
18    pub name: Option<String>,
19    #[serde(rename = "face", skip_serializing_if = "Option::is_none")]
20    pub face: Option<Box<crate::models::RackUnitFace>>,
21    #[serde(rename = "occupied", skip_serializing_if = "Option::is_none")]
22    pub occupied: Option<bool>,
23}
24
25impl RackUnit {
26    /// A rack unit is an abstraction formed by the set (rack, position, face); it does not exist as a row in the database.
27    pub fn new() -> RackUnit {
28        RackUnit {
29            id: None,
30            name: None,
31            face: None,
32            occupied: None,
33        }
34    }
35}