Skip to main content

netbox_openapi/models/
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/// WritableWirelessLinkRequest : Base serializer class for models inheriting from PrimaryModel.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct WritableWirelessLinkRequest {
15    #[serde(rename = "interface_a")]
16    pub interface_a: Box<crate::models::PatchedWritableVirtualCircuitTerminationRequestInterface>,
17    #[serde(rename = "interface_b")]
18    pub interface_b: Box<crate::models::PatchedWritableVirtualCircuitTerminationRequestInterface>,
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 WritableWirelessLinkRequest {
82    /// Base serializer class for models inheriting from PrimaryModel.
83    pub fn new(
84        interface_a: crate::models::PatchedWritableVirtualCircuitTerminationRequestInterface,
85        interface_b: crate::models::PatchedWritableVirtualCircuitTerminationRequestInterface,
86    ) -> WritableWirelessLinkRequest {
87        WritableWirelessLinkRequest {
88            interface_a: Box::new(interface_a),
89            interface_b: Box::new(interface_b),
90            ssid: None,
91            status: None,
92            tenant: None,
93            auth_type: None,
94            auth_cipher: None,
95            auth_psk: None,
96            distance: None,
97            distance_unit: None,
98            description: None,
99            owner: None,
100            comments: None,
101            tags: None,
102            custom_fields: None,
103        }
104    }
105}
106
107/// * `connected` - Connected * `planned` - Planned * `decommissioning` - Decommissioning
108#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
109pub enum Status {
110    #[serde(rename = "connected")]
111    Connected,
112    #[serde(rename = "planned")]
113    Planned,
114    #[serde(rename = "decommissioning")]
115    Decommissioning,
116}
117
118impl Default for Status {
119    fn default() -> Status {
120        Self::Connected
121    }
122}
123/// * `open` - Open * `wep` - WEP * `wpa-personal` - WPA Personal (PSK) * `wpa-enterprise` - WPA Enterprise
124#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
125pub enum AuthType {
126    #[serde(rename = "open")]
127    Open,
128    #[serde(rename = "wep")]
129    Wep,
130    #[serde(rename = "wpa-personal")]
131    WpaPersonal,
132    #[serde(rename = "wpa-enterprise")]
133    WpaEnterprise,
134    #[serde(rename = "")]
135    Empty,
136    #[serde(rename = "null")]
137    Null,
138}
139
140impl Default for AuthType {
141    fn default() -> AuthType {
142        Self::Open
143    }
144}
145/// * `auto` - Auto * `tkip` - TKIP * `aes` - AES
146#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
147pub enum AuthCipher {
148    #[serde(rename = "auto")]
149    Auto,
150    #[serde(rename = "tkip")]
151    Tkip,
152    #[serde(rename = "aes")]
153    Aes,
154    #[serde(rename = "")]
155    Empty,
156    #[serde(rename = "null")]
157    Null,
158}
159
160impl Default for AuthCipher {
161    fn default() -> AuthCipher {
162        Self::Auto
163    }
164}
165/// * `km` - Kilometers * `m` - Meters * `mi` - Miles * `ft` - Feet
166#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
167pub enum DistanceUnit {
168    #[serde(rename = "km")]
169    Km,
170    #[serde(rename = "m")]
171    M,
172    #[serde(rename = "mi")]
173    Mi,
174    #[serde(rename = "ft")]
175    Ft,
176    #[serde(rename = "")]
177    Empty,
178    #[serde(rename = "null")]
179    Null,
180}
181
182impl Default for DistanceUnit {
183    fn default() -> DistanceUnit {
184        Self::Km
185    }
186}