netbox_openapi/models/
rack_reservation_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 RackReservationStatus {
13    /// * `pending` - Pending * `active` - Active * `stale` - Stale
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 RackReservationStatus {
21    pub fn new() -> RackReservationStatus {
22        RackReservationStatus {
23            value: None,
24            label: None,
25        }
26    }
27}
28
29/// * `pending` - Pending * `active` - Active * `stale` - Stale
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32    #[serde(rename = "pending")]
33    Pending,
34    #[serde(rename = "active")]
35    Active,
36    #[serde(rename = "stale")]
37    Stale,
38}
39
40impl Default for Value {
41    fn default() -> Value {
42        Self::Pending
43    }
44}
45///
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Label {
48    #[serde(rename = "Pending")]
49    Pending,
50    #[serde(rename = "Active")]
51    Active,
52    #[serde(rename = "Stale")]
53    Stale,
54}
55
56impl Default for Label {
57    fn default() -> Label {
58        Self::Pending
59    }
60}