netbox_openapi/models/patched_writable_power_port_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/// PatchedWritablePowerPortRequest : Adds an `owner` field for models which have a ForeignKey to users.Owner.
12
13#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
14pub struct PatchedWritablePowerPortRequest {
15 #[serde(rename = "device", skip_serializing_if = "Option::is_none")]
16 pub device: Option<Box<crate::models::BriefInterfaceRequestDevice>>,
17 #[serde(
18 rename = "module",
19 default,
20 with = "::serde_with::rust::double_option",
21 skip_serializing_if = "Option::is_none"
22 )]
23 pub module: Option<Option<Box<crate::models::ConsolePortRequestModule>>>,
24 #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
25 pub name: Option<String>,
26 /// Physical label
27 #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
28 pub label: Option<String>,
29 /// Physical port type * `iec-60320-c6` - C6 * `iec-60320-c8` - C8 * `iec-60320-c14` - C14 * `iec-60320-c16` - C16 * `iec-60320-c18` - C18 * `iec-60320-c20` - C20 * `iec-60320-c22` - C22 * `iec-60309-p-n-e-4h` - P+N+E 4H * `iec-60309-p-n-e-6h` - P+N+E 6H * `iec-60309-p-n-e-9h` - P+N+E 9H * `iec-60309-2p-e-4h` - 2P+E 4H * `iec-60309-2p-e-6h` - 2P+E 6H * `iec-60309-2p-e-9h` - 2P+E 9H * `iec-60309-3p-e-4h` - 3P+E 4H * `iec-60309-3p-e-6h` - 3P+E 6H * `iec-60309-3p-e-9h` - 3P+E 9H * `iec-60309-3p-n-e-4h` - 3P+N+E 4H * `iec-60309-3p-n-e-6h` - 3P+N+E 6H * `iec-60309-3p-n-e-9h` - 3P+N+E 9H * `iec-60906-1` - IEC 60906-1 * `nbr-14136-10a` - 2P+T 10A (NBR 14136) * `nbr-14136-20a` - 2P+T 20A (NBR 14136) * `nema-1-15p` - NEMA 1-15P * `nema-5-15p` - NEMA 5-15P * `nema-5-20p` - NEMA 5-20P * `nema-5-30p` - NEMA 5-30P * `nema-5-50p` - NEMA 5-50P * `nema-6-15p` - NEMA 6-15P * `nema-6-20p` - NEMA 6-20P * `nema-6-30p` - NEMA 6-30P * `nema-6-50p` - NEMA 6-50P * `nema-10-30p` - NEMA 10-30P * `nema-10-50p` - NEMA 10-50P * `nema-14-20p` - NEMA 14-20P * `nema-14-30p` - NEMA 14-30P * `nema-14-50p` - NEMA 14-50P * `nema-14-60p` - NEMA 14-60P * `nema-15-15p` - NEMA 15-15P * `nema-15-20p` - NEMA 15-20P * `nema-15-30p` - NEMA 15-30P * `nema-15-50p` - NEMA 15-50P * `nema-15-60p` - NEMA 15-60P * `nema-l1-15p` - NEMA L1-15P * `nema-l5-15p` - NEMA L5-15P * `nema-l5-20p` - NEMA L5-20P * `nema-l5-30p` - NEMA L5-30P * `nema-l5-50p` - NEMA L5-50P * `nema-l6-15p` - NEMA L6-15P * `nema-l6-20p` - NEMA L6-20P * `nema-l6-30p` - NEMA L6-30P * `nema-l6-50p` - NEMA L6-50P * `nema-l10-30p` - NEMA L10-30P * `nema-l14-20p` - NEMA L14-20P * `nema-l14-30p` - NEMA L14-30P * `nema-l14-50p` - NEMA L14-50P * `nema-l14-60p` - NEMA L14-60P * `nema-l15-20p` - NEMA L15-20P * `nema-l15-30p` - NEMA L15-30P * `nema-l15-50p` - NEMA L15-50P * `nema-l15-60p` - NEMA L15-60P * `nema-l21-20p` - NEMA L21-20P * `nema-l21-30p` - NEMA L21-30P * `nema-l22-20p` - NEMA L22-20P * `nema-l22-30p` - NEMA L22-30P * `cs6361c` - CS6361C * `cs6365c` - CS6365C * `cs8165c` - CS8165C * `cs8265c` - CS8265C * `cs8365c` - CS8365C * `cs8465c` - CS8465C * `ita-c` - ITA Type C (CEE 7/16) * `ita-e` - ITA Type E (CEE 7/6) * `ita-f` - ITA Type F (CEE 7/4) * `ita-ef` - ITA Type E/F (CEE 7/7) * `ita-g` - ITA Type G (BS 1363) * `ita-h` - ITA Type H * `ita-i` - ITA Type I * `ita-j` - ITA Type J * `ita-k` - ITA Type K * `ita-l` - ITA Type L (CEI 23-50) * `ita-m` - ITA Type M (BS 546) * `ita-n` - ITA Type N * `ita-o` - ITA Type O * `usb-a` - USB Type A * `usb-b` - USB Type B * `usb-c` - USB Type C * `usb-mini-a` - USB Mini A * `usb-mini-b` - USB Mini B * `usb-micro-a` - USB Micro A * `usb-micro-b` - USB Micro B * `usb-micro-ab` - USB Micro AB * `usb-3-b` - USB 3.0 Type B * `usb-3-micro-b` - USB 3.0 Micro B * `molex-micro-fit-1x2` - Molex Micro-Fit 1x2 * `molex-micro-fit-2x2` - Molex Micro-Fit 2x2 * `molex-micro-fit-2x3` - Molex Micro-Fit 2x3 * `molex-micro-fit-2x4` - Molex Micro-Fit 2x4 * `dc-terminal` - DC Terminal * `saf-d-grid` - Saf-D-Grid * `neutrik-powercon-20` - Neutrik powerCON (20A) * `neutrik-powercon-32` - Neutrik powerCON (32A) * `neutrik-powercon-true1` - Neutrik powerCON TRUE1 * `neutrik-powercon-true1-top` - Neutrik powerCON TRUE1 TOP * `ubiquiti-smartpower` - Ubiquiti SmartPower * `hardwired` - Hardwired * `other` - Other
30 #[serde(
31 rename = "type",
32 default,
33 with = "::serde_with::rust::double_option",
34 skip_serializing_if = "Option::is_none"
35 )]
36 pub r#type: Option<Option<RHashType>>,
37 /// Maximum power draw (watts)
38 #[serde(
39 rename = "maximum_draw",
40 default,
41 with = "::serde_with::rust::double_option",
42 skip_serializing_if = "Option::is_none"
43 )]
44 pub maximum_draw: Option<Option<i32>>,
45 /// Allocated power draw (watts)
46 #[serde(
47 rename = "allocated_draw",
48 default,
49 with = "::serde_with::rust::double_option",
50 skip_serializing_if = "Option::is_none"
51 )]
52 pub allocated_draw: Option<Option<i32>>,
53 #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
54 pub description: Option<String>,
55 /// Treat as if a cable is connected
56 #[serde(rename = "mark_connected", skip_serializing_if = "Option::is_none")]
57 pub mark_connected: Option<bool>,
58 #[serde(
59 rename = "owner",
60 default,
61 with = "::serde_with::rust::double_option",
62 skip_serializing_if = "Option::is_none"
63 )]
64 pub owner: Option<Option<Box<crate::models::AsnRangeRequestOwner>>>,
65 #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
66 pub tags: Option<Vec<crate::models::NestedTagRequest>>,
67 #[serde(rename = "custom_fields", skip_serializing_if = "Option::is_none")]
68 pub custom_fields: Option<::std::collections::HashMap<String, serde_json::Value>>,
69}
70
71impl PatchedWritablePowerPortRequest {
72 /// Adds an `owner` field for models which have a ForeignKey to users.Owner.
73 pub fn new() -> PatchedWritablePowerPortRequest {
74 PatchedWritablePowerPortRequest {
75 device: None,
76 module: None,
77 name: None,
78 label: None,
79 r#type: None,
80 maximum_draw: None,
81 allocated_draw: None,
82 description: None,
83 mark_connected: None,
84 owner: None,
85 tags: None,
86 custom_fields: None,
87 }
88 }
89}
90
91/// Physical port type * `iec-60320-c6` - C6 * `iec-60320-c8` - C8 * `iec-60320-c14` - C14 * `iec-60320-c16` - C16 * `iec-60320-c18` - C18 * `iec-60320-c20` - C20 * `iec-60320-c22` - C22 * `iec-60309-p-n-e-4h` - P+N+E 4H * `iec-60309-p-n-e-6h` - P+N+E 6H * `iec-60309-p-n-e-9h` - P+N+E 9H * `iec-60309-2p-e-4h` - 2P+E 4H * `iec-60309-2p-e-6h` - 2P+E 6H * `iec-60309-2p-e-9h` - 2P+E 9H * `iec-60309-3p-e-4h` - 3P+E 4H * `iec-60309-3p-e-6h` - 3P+E 6H * `iec-60309-3p-e-9h` - 3P+E 9H * `iec-60309-3p-n-e-4h` - 3P+N+E 4H * `iec-60309-3p-n-e-6h` - 3P+N+E 6H * `iec-60309-3p-n-e-9h` - 3P+N+E 9H * `iec-60906-1` - IEC 60906-1 * `nbr-14136-10a` - 2P+T 10A (NBR 14136) * `nbr-14136-20a` - 2P+T 20A (NBR 14136) * `nema-1-15p` - NEMA 1-15P * `nema-5-15p` - NEMA 5-15P * `nema-5-20p` - NEMA 5-20P * `nema-5-30p` - NEMA 5-30P * `nema-5-50p` - NEMA 5-50P * `nema-6-15p` - NEMA 6-15P * `nema-6-20p` - NEMA 6-20P * `nema-6-30p` - NEMA 6-30P * `nema-6-50p` - NEMA 6-50P * `nema-10-30p` - NEMA 10-30P * `nema-10-50p` - NEMA 10-50P * `nema-14-20p` - NEMA 14-20P * `nema-14-30p` - NEMA 14-30P * `nema-14-50p` - NEMA 14-50P * `nema-14-60p` - NEMA 14-60P * `nema-15-15p` - NEMA 15-15P * `nema-15-20p` - NEMA 15-20P * `nema-15-30p` - NEMA 15-30P * `nema-15-50p` - NEMA 15-50P * `nema-15-60p` - NEMA 15-60P * `nema-l1-15p` - NEMA L1-15P * `nema-l5-15p` - NEMA L5-15P * `nema-l5-20p` - NEMA L5-20P * `nema-l5-30p` - NEMA L5-30P * `nema-l5-50p` - NEMA L5-50P * `nema-l6-15p` - NEMA L6-15P * `nema-l6-20p` - NEMA L6-20P * `nema-l6-30p` - NEMA L6-30P * `nema-l6-50p` - NEMA L6-50P * `nema-l10-30p` - NEMA L10-30P * `nema-l14-20p` - NEMA L14-20P * `nema-l14-30p` - NEMA L14-30P * `nema-l14-50p` - NEMA L14-50P * `nema-l14-60p` - NEMA L14-60P * `nema-l15-20p` - NEMA L15-20P * `nema-l15-30p` - NEMA L15-30P * `nema-l15-50p` - NEMA L15-50P * `nema-l15-60p` - NEMA L15-60P * `nema-l21-20p` - NEMA L21-20P * `nema-l21-30p` - NEMA L21-30P * `nema-l22-20p` - NEMA L22-20P * `nema-l22-30p` - NEMA L22-30P * `cs6361c` - CS6361C * `cs6365c` - CS6365C * `cs8165c` - CS8165C * `cs8265c` - CS8265C * `cs8365c` - CS8365C * `cs8465c` - CS8465C * `ita-c` - ITA Type C (CEE 7/16) * `ita-e` - ITA Type E (CEE 7/6) * `ita-f` - ITA Type F (CEE 7/4) * `ita-ef` - ITA Type E/F (CEE 7/7) * `ita-g` - ITA Type G (BS 1363) * `ita-h` - ITA Type H * `ita-i` - ITA Type I * `ita-j` - ITA Type J * `ita-k` - ITA Type K * `ita-l` - ITA Type L (CEI 23-50) * `ita-m` - ITA Type M (BS 546) * `ita-n` - ITA Type N * `ita-o` - ITA Type O * `usb-a` - USB Type A * `usb-b` - USB Type B * `usb-c` - USB Type C * `usb-mini-a` - USB Mini A * `usb-mini-b` - USB Mini B * `usb-micro-a` - USB Micro A * `usb-micro-b` - USB Micro B * `usb-micro-ab` - USB Micro AB * `usb-3-b` - USB 3.0 Type B * `usb-3-micro-b` - USB 3.0 Micro B * `molex-micro-fit-1x2` - Molex Micro-Fit 1x2 * `molex-micro-fit-2x2` - Molex Micro-Fit 2x2 * `molex-micro-fit-2x3` - Molex Micro-Fit 2x3 * `molex-micro-fit-2x4` - Molex Micro-Fit 2x4 * `dc-terminal` - DC Terminal * `saf-d-grid` - Saf-D-Grid * `neutrik-powercon-20` - Neutrik powerCON (20A) * `neutrik-powercon-32` - Neutrik powerCON (32A) * `neutrik-powercon-true1` - Neutrik powerCON TRUE1 * `neutrik-powercon-true1-top` - Neutrik powerCON TRUE1 TOP * `ubiquiti-smartpower` - Ubiquiti SmartPower * `hardwired` - Hardwired * `other` - Other
92#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
93pub enum RHashType {
94 #[serde(rename = "iec-60320-c6")]
95 Iec60320C6,
96 #[serde(rename = "iec-60320-c8")]
97 Iec60320C8,
98 #[serde(rename = "iec-60320-c14")]
99 Iec60320C14,
100 #[serde(rename = "iec-60320-c16")]
101 Iec60320C16,
102 #[serde(rename = "iec-60320-c18")]
103 Iec60320C18,
104 #[serde(rename = "iec-60320-c20")]
105 Iec60320C20,
106 #[serde(rename = "iec-60320-c22")]
107 Iec60320C22,
108 #[serde(rename = "iec-60309-p-n-e-4h")]
109 Iec60309PNE4h,
110 #[serde(rename = "iec-60309-p-n-e-6h")]
111 Iec60309PNE6h,
112 #[serde(rename = "iec-60309-p-n-e-9h")]
113 Iec60309PNE9h,
114 #[serde(rename = "iec-60309-2p-e-4h")]
115 Iec603092pE4h,
116 #[serde(rename = "iec-60309-2p-e-6h")]
117 Iec603092pE6h,
118 #[serde(rename = "iec-60309-2p-e-9h")]
119 Iec603092pE9h,
120 #[serde(rename = "iec-60309-3p-e-4h")]
121 Iec603093pE4h,
122 #[serde(rename = "iec-60309-3p-e-6h")]
123 Iec603093pE6h,
124 #[serde(rename = "iec-60309-3p-e-9h")]
125 Iec603093pE9h,
126 #[serde(rename = "iec-60309-3p-n-e-4h")]
127 Iec603093pNE4h,
128 #[serde(rename = "iec-60309-3p-n-e-6h")]
129 Iec603093pNE6h,
130 #[serde(rename = "iec-60309-3p-n-e-9h")]
131 Iec603093pNE9h,
132 #[serde(rename = "iec-60906-1")]
133 Iec609061,
134 #[serde(rename = "nbr-14136-10a")]
135 Nbr1413610a,
136 #[serde(rename = "nbr-14136-20a")]
137 Nbr1413620a,
138 #[serde(rename = "nema-1-15p")]
139 Nema115p,
140 #[serde(rename = "nema-5-15p")]
141 Nema515p,
142 #[serde(rename = "nema-5-20p")]
143 Nema520p,
144 #[serde(rename = "nema-5-30p")]
145 Nema530p,
146 #[serde(rename = "nema-5-50p")]
147 Nema550p,
148 #[serde(rename = "nema-6-15p")]
149 Nema615p,
150 #[serde(rename = "nema-6-20p")]
151 Nema620p,
152 #[serde(rename = "nema-6-30p")]
153 Nema630p,
154 #[serde(rename = "nema-6-50p")]
155 Nema650p,
156 #[serde(rename = "nema-10-30p")]
157 Nema1030p,
158 #[serde(rename = "nema-10-50p")]
159 Nema1050p,
160 #[serde(rename = "nema-14-20p")]
161 Nema1420p,
162 #[serde(rename = "nema-14-30p")]
163 Nema1430p,
164 #[serde(rename = "nema-14-50p")]
165 Nema1450p,
166 #[serde(rename = "nema-14-60p")]
167 Nema1460p,
168 #[serde(rename = "nema-15-15p")]
169 Nema1515p,
170 #[serde(rename = "nema-15-20p")]
171 Nema1520p,
172 #[serde(rename = "nema-15-30p")]
173 Nema1530p,
174 #[serde(rename = "nema-15-50p")]
175 Nema1550p,
176 #[serde(rename = "nema-15-60p")]
177 Nema1560p,
178 #[serde(rename = "nema-l1-15p")]
179 NemaL115p,
180 #[serde(rename = "nema-l5-15p")]
181 NemaL515p,
182 #[serde(rename = "nema-l5-20p")]
183 NemaL520p,
184 #[serde(rename = "nema-l5-30p")]
185 NemaL530p,
186 #[serde(rename = "nema-l5-50p")]
187 NemaL550p,
188 #[serde(rename = "nema-l6-15p")]
189 NemaL615p,
190 #[serde(rename = "nema-l6-20p")]
191 NemaL620p,
192 #[serde(rename = "nema-l6-30p")]
193 NemaL630p,
194 #[serde(rename = "nema-l6-50p")]
195 NemaL650p,
196 #[serde(rename = "nema-l10-30p")]
197 NemaL1030p,
198 #[serde(rename = "nema-l14-20p")]
199 NemaL1420p,
200 #[serde(rename = "nema-l14-30p")]
201 NemaL1430p,
202 #[serde(rename = "nema-l14-50p")]
203 NemaL1450p,
204 #[serde(rename = "nema-l14-60p")]
205 NemaL1460p,
206 #[serde(rename = "nema-l15-20p")]
207 NemaL1520p,
208 #[serde(rename = "nema-l15-30p")]
209 NemaL1530p,
210 #[serde(rename = "nema-l15-50p")]
211 NemaL1550p,
212 #[serde(rename = "nema-l15-60p")]
213 NemaL1560p,
214 #[serde(rename = "nema-l21-20p")]
215 NemaL2120p,
216 #[serde(rename = "nema-l21-30p")]
217 NemaL2130p,
218 #[serde(rename = "nema-l22-20p")]
219 NemaL2220p,
220 #[serde(rename = "nema-l22-30p")]
221 NemaL2230p,
222 #[serde(rename = "cs6361c")]
223 Cs6361c,
224 #[serde(rename = "cs6365c")]
225 Cs6365c,
226 #[serde(rename = "cs8165c")]
227 Cs8165c,
228 #[serde(rename = "cs8265c")]
229 Cs8265c,
230 #[serde(rename = "cs8365c")]
231 Cs8365c,
232 #[serde(rename = "cs8465c")]
233 Cs8465c,
234 #[serde(rename = "ita-c")]
235 ItaC,
236 #[serde(rename = "ita-e")]
237 ItaE,
238 #[serde(rename = "ita-f")]
239 ItaF,
240 #[serde(rename = "ita-ef")]
241 ItaEf,
242 #[serde(rename = "ita-g")]
243 ItaG,
244 #[serde(rename = "ita-h")]
245 ItaH,
246 #[serde(rename = "ita-i")]
247 ItaI,
248 #[serde(rename = "ita-j")]
249 ItaJ,
250 #[serde(rename = "ita-k")]
251 ItaK,
252 #[serde(rename = "ita-l")]
253 ItaL,
254 #[serde(rename = "ita-m")]
255 ItaM,
256 #[serde(rename = "ita-n")]
257 ItaN,
258 #[serde(rename = "ita-o")]
259 ItaO,
260 #[serde(rename = "usb-a")]
261 UsbA,
262 #[serde(rename = "usb-b")]
263 UsbB,
264 #[serde(rename = "usb-c")]
265 UsbC,
266 #[serde(rename = "usb-mini-a")]
267 UsbMiniA,
268 #[serde(rename = "usb-mini-b")]
269 UsbMiniB,
270 #[serde(rename = "usb-micro-a")]
271 UsbMicroA,
272 #[serde(rename = "usb-micro-b")]
273 UsbMicroB,
274 #[serde(rename = "usb-micro-ab")]
275 UsbMicroAb,
276 #[serde(rename = "usb-3-b")]
277 Usb3B,
278 #[serde(rename = "usb-3-micro-b")]
279 Usb3MicroB,
280 #[serde(rename = "molex-micro-fit-1x2")]
281 MolexMicroFit1x2,
282 #[serde(rename = "molex-micro-fit-2x2")]
283 MolexMicroFit2x2,
284 #[serde(rename = "molex-micro-fit-2x3")]
285 MolexMicroFit2x3,
286 #[serde(rename = "molex-micro-fit-2x4")]
287 MolexMicroFit2x4,
288 #[serde(rename = "dc-terminal")]
289 DcTerminal,
290 #[serde(rename = "saf-d-grid")]
291 SafDGrid,
292 #[serde(rename = "neutrik-powercon-20")]
293 NeutrikPowercon20,
294 #[serde(rename = "neutrik-powercon-32")]
295 NeutrikPowercon32,
296 #[serde(rename = "neutrik-powercon-true1")]
297 NeutrikPowerconTrue1,
298 #[serde(rename = "neutrik-powercon-true1-top")]
299 NeutrikPowerconTrue1Top,
300 #[serde(rename = "ubiquiti-smartpower")]
301 UbiquitiSmartpower,
302 #[serde(rename = "hardwired")]
303 Hardwired,
304 #[serde(rename = "other")]
305 Other,
306 #[serde(rename = "")]
307 Empty,
308 #[serde(rename = "null")]
309 Null,
310}
311
312impl Default for RHashType {
313 fn default() -> RHashType {
314 Self::Iec60320C6
315 }
316}