netbox_openapi/models/
interface_duplex.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 InterfaceDuplex {
13    /// * `half` - Half * `full` - Full * `auto` - Auto
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 InterfaceDuplex {
21    pub fn new() -> InterfaceDuplex {
22        InterfaceDuplex {
23            value: None,
24            label: None,
25        }
26    }
27}
28
29/// * `half` - Half * `full` - Full * `auto` - Auto
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32    #[serde(rename = "half")]
33    Half,
34    #[serde(rename = "full")]
35    Full,
36    #[serde(rename = "auto")]
37    Auto,
38    #[serde(rename = "")]
39    Empty,
40    #[serde(rename = "null")]
41    Null,
42}
43
44impl Default for Value {
45    fn default() -> Value {
46        Self::Half
47    }
48}
49///
50#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
51pub enum Label {
52    #[serde(rename = "Half")]
53    Half,
54    #[serde(rename = "Full")]
55    Full,
56    #[serde(rename = "Auto")]
57    Auto,
58}
59
60impl Default for Label {
61    fn default() -> Label {
62        Self::Half
63    }
64}