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