Skip to main content

netbox_openapi/models/
patched_writable_wireless_link_request.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.6.2 (4.6)
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11/// PatchedWritableWirelessLinkRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritableWirelessLinkRequest {
15    #[serde(rename = "interface_a", skip_serializing_if = "Option::is_none")]
16    pub interface_a:
17        Option<Box<crate::models::PatchedWritableVirtualCircuitTerminationRequestInterface>>,
18    #[serde(rename = "interface_b", skip_serializing_if = "Option::is_none")]
19    pub interface_b:
20        Option<Box<crate::models::PatchedWritableVirtualCircuitTerminationRequestInterface>>,
21    #[serde(rename = "ssid", skip_serializing_if = "Option::is_none")]
22    pub ssid: Option<String>,
23    /// * `connected` - Connected * `planned` - Planned * `decommissioning` - Decommissioning
24    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
25    pub status: Option<Status>,
26    #[serde(
27        rename = "tenant",
28        default,
29        with = "::serde_with::rust::double_option",
30        skip_serializing_if = "Option::is_none"
31    )]
32    pub tenant: Option<Option<Box<crate::models::AsnRangeRequestTenant>>>,
33    /// * `open` - Open * `wep` - WEP * `wpa-personal` - WPA Personal (PSK) * `wpa-enterprise` - WPA Enterprise
34    #[serde(
35        rename = "auth_type",
36        default,
37        with = "::serde_with::rust::double_option",
38        skip_serializing_if = "Option::is_none"
39    )]
40    pub auth_type: Option<Option<AuthType>>,
41    /// * `auto` - Auto * `tkip` - TKIP * `aes` - AES
42    #[serde(
43        rename = "auth_cipher",
44        default,
45        with = "::serde_with::rust::double_option",
46        skip_serializing_if = "Option::is_none"
47    )]
48    pub auth_cipher: Option<Option<AuthCipher>>,
49    #[serde(rename = "auth_psk", skip_serializing_if = "Option::is_none")]
50    pub auth_psk: Option<String>,
51    #[serde(
52        rename = "distance",
53        default,
54        with = "::serde_with::rust::double_option",
55        skip_serializing_if = "Option::is_none"
56    )]
57    pub distance: Option<Option<f64>>,
58    /// * `km` - Kilometers * `m` - Meters * `mi` - Miles * `ft` - Feet
59    #[serde(
60        rename = "distance_unit",
61        default,
62        with = "::serde_with::rust::double_option",
63        skip_serializing_if = "Option::is_none"
64    )]
65    pub distance_unit: Option<Option<DistanceUnit>>,
66    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
67    pub description: Option<String>,
68    #[serde(
69        rename = "owner",
70        default,
71        with = "::serde_with::rust::double_option",
72        skip_serializing_if = "Option::is_none"
73    )]
74    pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
75    #[serde(rename = "comments", skip_serializing_if = "Option::is_none")]
76    pub comments: Option<String>,
77    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
78    pub tags: Option<Vec<crate::models::NestedTagRequest>>,
79    #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
80    pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
81}
82
83impl PatchedWritableWirelessLinkRequest {
84    /// Base serializer class for models inheriting from PrimaryModel.
85    pub fn new() -> PatchedWritableWirelessLinkRequest {
86        PatchedWritableWirelessLinkRequest {
87            interface_a: None,
88            interface_b: None,
89            ssid: None,
90            status: None,
91            tenant: None,
92            auth_type: None,
93            auth_cipher: None,
94            auth_psk: None,
95            distance: None,
96            distance_unit: None,
97            description: None,
98            owner: None,
99            comments: None,
100            tags: None,
101            custom_fields: None,
102        }
103    }
104}
105
106/// * `connected` - Connected * `planned` - Planned * `decommissioning` - Decommissioning
107#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
108pub enum Status {
109    #[serde(rename = "connected")]
110    Connected,
111    #[serde(rename = "planned")]
112    Planned,
113    #[serde(rename = "decommissioning")]
114    Decommissioning,
115}
116
117impl Default for Status {
118    fn default() -> Status {
119        Self::Connected
120    }
121}
122/// * `open` - Open * `wep` - WEP * `wpa-personal` - WPA Personal (PSK) * `wpa-enterprise` - WPA Enterprise
123#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
124pub enum AuthType {
125    #[serde(rename = "open")]
126    Open,
127    #[serde(rename = "wep")]
128    Wep,
129    #[serde(rename = "wpa-personal")]
130    WpaPersonal,
131    #[serde(rename = "wpa-enterprise")]
132    WpaEnterprise,
133    #[serde(rename = "")]
134    Empty,
135    #[serde(rename = "null")]
136    Null,
137}
138
139impl Default for AuthType {
140    fn default() -> AuthType {
141        Self::Open
142    }
143}
144/// * `auto` - Auto * `tkip` - TKIP * `aes` - AES
145#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
146pub enum AuthCipher {
147    #[serde(rename = "auto")]
148    Auto,
149    #[serde(rename = "tkip")]
150    Tkip,
151    #[serde(rename = "aes")]
152    Aes,
153    #[serde(rename = "")]
154    Empty,
155    #[serde(rename = "null")]
156    Null,
157}
158
159impl Default for AuthCipher {
160    fn default() -> AuthCipher {
161        Self::Auto
162    }
163}
164/// * `km` - Kilometers * `m` - Meters * `mi` - Miles * `ft` - Feet
165#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
166pub enum DistanceUnit {
167    #[serde(rename = "km")]
168    Km,
169    #[serde(rename = "m")]
170    M,
171    #[serde(rename = "mi")]
172    Mi,
173    #[serde(rename = "ft")]
174    Ft,
175    #[serde(rename = "")]
176    Empty,
177    #[serde(rename = "null")]
178    Null,
179}
180
181impl Default for DistanceUnit {
182    fn default() -> DistanceUnit {
183        Self::Km
184    }
185}