proxmox_api/generated/nodes/node/lxc/vmid/
config.rs

1pub struct ConfigClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> ConfigClient<T>
6where
7    T: crate::client::Client,
8{
9    pub fn new(client: T, parent_path: &str) -> Self {
10        Self {
11            client,
12            path: format!("{}{}", parent_path, "/config"),
13        }
14    }
15}
16impl<T> ConfigClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get container configuration."]
21    pub fn get(&self, params: GetParams) -> Result<GetOutput, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &params)
24    }
25}
26impl<T> ConfigClient<T>
27where
28    T: crate::client::Client,
29{
30    #[doc = "Set container options."]
31    pub fn put(&self, params: PutParams) -> Result<(), T::Error> {
32        let path = self.path.to_string();
33        self.client.put(&path, &params)
34    }
35}
36impl GetOutput {
37    pub fn new(digest: String) -> Self {
38        Self {
39            digest,
40            arch: Default::default(),
41            cmode: Default::default(),
42            console: Default::default(),
43            cores: Default::default(),
44            cpulimit: Default::default(),
45            cpuunits: Default::default(),
46            debug: Default::default(),
47            description: Default::default(),
48            devs: Default::default(),
49            features: Default::default(),
50            hookscript: Default::default(),
51            hostname: Default::default(),
52            lock: Default::default(),
53            lxc: Default::default(),
54            memory: Default::default(),
55            mps: Default::default(),
56            nameserver: Default::default(),
57            nets: Default::default(),
58            onboot: Default::default(),
59            ostype: Default::default(),
60            protection: Default::default(),
61            rootfs: Default::default(),
62            searchdomain: Default::default(),
63            startup: Default::default(),
64            swap: Default::default(),
65            tags: Default::default(),
66            template: Default::default(),
67            timezone: Default::default(),
68            tty: Default::default(),
69            unprivileged: Default::default(),
70            unuseds: Default::default(),
71            additional_properties: Default::default(),
72        }
73    }
74}
75#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
76pub struct GetOutput {
77    #[serde(skip_serializing_if = "Option::is_none", default)]
78    #[doc = "OS architecture type."]
79    pub arch: Option<Arch>,
80    #[serde(skip_serializing_if = "Option::is_none", default)]
81    #[doc = "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login)."]
82    pub cmode: Option<Cmode>,
83    #[serde(
84        serialize_with = "crate::types::serialize_bool_optional",
85        deserialize_with = "crate::types::deserialize_bool_optional"
86    )]
87    #[serde(skip_serializing_if = "Option::is_none", default)]
88    #[doc = "Attach a console device (/dev/console) to the container."]
89    pub console: Option<bool>,
90    #[serde(
91        serialize_with = "crate::types::serialize_int_optional",
92        deserialize_with = "crate::types::deserialize_int_optional"
93    )]
94    #[serde(skip_serializing_if = "Option::is_none", default)]
95    #[doc = "The number of cores assigned to the container. A container can use all available cores by default."]
96    pub cores: Option<u64>,
97    #[serde(
98        serialize_with = "crate::types::serialize_number_optional",
99        deserialize_with = "crate::types::deserialize_number_optional"
100    )]
101    #[serde(skip_serializing_if = "Option::is_none", default)]
102    #[doc = "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit."]
103    pub cpulimit: Option<f64>,
104    #[serde(skip_serializing_if = "Option::is_none", default)]
105    #[doc = "CPU weight for a container, will be clamped to [1, 10000] in cgroup v2."]
106    #[doc = "CPU weight for a container. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this container gets. Number is relative to the weights of all the other running guests."]
107    pub cpuunits: Option<()>,
108    #[serde(
109        serialize_with = "crate::types::serialize_bool_optional",
110        deserialize_with = "crate::types::deserialize_bool_optional"
111    )]
112    #[serde(skip_serializing_if = "Option::is_none", default)]
113    #[doc = "Try to be more verbose. For now this only enables debug log-level on start."]
114    pub debug: Option<bool>,
115    #[serde(skip_serializing_if = "Option::is_none", default)]
116    #[doc = "Description for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file."]
117    pub description: Option<String>,
118    #[serde(rename = "dev[n]")]
119    #[serde(
120        serialize_with = "crate::types::serialize_multi::<NumberedDevs, _>",
121        deserialize_with = "crate::types::deserialize_multi::<NumberedDevs, _>"
122    )]
123    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
124    #[serde(flatten)]
125    #[doc = "Device to pass through to the container"]
126    pub devs: ::std::collections::HashMap<u32, String>,
127    #[doc = "SHA1 digest of configuration file. This can be used to prevent concurrent modifications."]
128    pub digest: String,
129    #[serde(skip_serializing_if = "Option::is_none", default)]
130    #[doc = "Allow containers access to advanced features."]
131    pub features: Option<String>,
132    #[serde(skip_serializing_if = "Option::is_none", default)]
133    #[doc = "Script that will be exectued during various steps in the containers lifetime."]
134    pub hookscript: Option<String>,
135    #[serde(skip_serializing_if = "Option::is_none", default)]
136    #[doc = "Set a host name for the container."]
137    pub hostname: Option<String>,
138    #[serde(skip_serializing_if = "Option::is_none", default)]
139    #[doc = "Lock/unlock the container."]
140    pub lock: Option<Lock>,
141    #[serde(skip_serializing_if = "::std::vec::Vec::is_empty", default)]
142    #[doc = "Array of lxc low-level configurations ([[key1, value1], [key2, value2] ...])."]
143    pub lxc: Vec<Vec<String>>,
144    #[serde(
145        serialize_with = "crate::types::serialize_int_optional",
146        deserialize_with = "crate::types::deserialize_int_optional"
147    )]
148    #[serde(skip_serializing_if = "Option::is_none", default)]
149    #[doc = "Amount of RAM for the container in MB."]
150    pub memory: Option<u64>,
151    #[serde(rename = "mp[n]")]
152    #[serde(
153        serialize_with = "crate::types::serialize_multi::<NumberedMps, _>",
154        deserialize_with = "crate::types::deserialize_multi::<NumberedMps, _>"
155    )]
156    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
157    #[serde(flatten)]
158    #[doc = "Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume."]
159    pub mps: ::std::collections::HashMap<u32, String>,
160    #[serde(skip_serializing_if = "Option::is_none", default)]
161    #[doc = "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver."]
162    pub nameserver: Option<String>,
163    #[serde(rename = "net[n]")]
164    #[serde(
165        serialize_with = "crate::types::serialize_multi::<NumberedNets, _>",
166        deserialize_with = "crate::types::deserialize_multi::<NumberedNets, _>"
167    )]
168    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
169    #[serde(flatten)]
170    #[doc = "Specifies network interfaces for the container."]
171    pub nets: ::std::collections::HashMap<u32, String>,
172    #[serde(
173        serialize_with = "crate::types::serialize_bool_optional",
174        deserialize_with = "crate::types::deserialize_bool_optional"
175    )]
176    #[serde(skip_serializing_if = "Option::is_none", default)]
177    #[doc = "Specifies whether a container will be started during system bootup."]
178    pub onboot: Option<bool>,
179    #[serde(skip_serializing_if = "Option::is_none", default)]
180    #[doc = "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/\\<ostype\\>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup."]
181    pub ostype: Option<Ostype>,
182    #[serde(
183        serialize_with = "crate::types::serialize_bool_optional",
184        deserialize_with = "crate::types::deserialize_bool_optional"
185    )]
186    #[serde(skip_serializing_if = "Option::is_none", default)]
187    #[doc = "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation."]
188    pub protection: Option<bool>,
189    #[serde(skip_serializing_if = "Option::is_none", default)]
190    #[doc = "Use volume as container root."]
191    pub rootfs: Option<String>,
192    #[serde(skip_serializing_if = "Option::is_none", default)]
193    #[doc = "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver."]
194    pub searchdomain: Option<String>,
195    #[serde(skip_serializing_if = "Option::is_none", default)]
196    #[doc = "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped."]
197    pub startup: Option<String>,
198    #[serde(
199        serialize_with = "crate::types::serialize_int_optional",
200        deserialize_with = "crate::types::deserialize_int_optional"
201    )]
202    #[serde(skip_serializing_if = "Option::is_none", default)]
203    #[doc = "Amount of SWAP for the container in MB."]
204    pub swap: Option<u64>,
205    #[serde(skip_serializing_if = "Option::is_none", default)]
206    #[doc = "Tags of the Container. This is only meta information."]
207    pub tags: Option<String>,
208    #[serde(
209        serialize_with = "crate::types::serialize_bool_optional",
210        deserialize_with = "crate::types::deserialize_bool_optional"
211    )]
212    #[serde(skip_serializing_if = "Option::is_none", default)]
213    #[doc = "Enable/disable Template."]
214    pub template: Option<bool>,
215    #[serde(skip_serializing_if = "Option::is_none", default)]
216    #[doc = "Time zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab"]
217    pub timezone: Option<String>,
218    #[serde(
219        serialize_with = "crate::types::serialize_int_optional",
220        deserialize_with = "crate::types::deserialize_int_optional"
221    )]
222    #[serde(skip_serializing_if = "Option::is_none", default)]
223    #[doc = "Specify the number of tty available to the container"]
224    pub tty: Option<u64>,
225    #[serde(
226        serialize_with = "crate::types::serialize_bool_optional",
227        deserialize_with = "crate::types::deserialize_bool_optional"
228    )]
229    #[serde(skip_serializing_if = "Option::is_none", default)]
230    #[doc = "Makes the container run as unprivileged user. (Should not be modified manually.)"]
231    pub unprivileged: Option<bool>,
232    #[serde(rename = "unused[n]")]
233    #[serde(
234        serialize_with = "crate::types::serialize_multi::<NumberedUnuseds, _>",
235        deserialize_with = "crate::types::deserialize_multi::<NumberedUnuseds, _>"
236    )]
237    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
238    #[serde(flatten)]
239    #[doc = "Reference to unused volumes. This is used internally, and should not be modified manually."]
240    pub unuseds: ::std::collections::HashMap<u32, String>,
241    #[serde(
242        flatten,
243        deserialize_with = "crate::types::multi::deserialize_additional_data::<'_, GetOutput, _, _>"
244    )]
245    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
246}
247impl crate::types::multi::Test for GetOutput {
248    fn test_fn() -> fn(&str) -> bool {
249        fn the_test(input: &str) -> bool {
250            let array = [
251                <NumberedDevs as crate::types::multi::NumberedItems>::key_matches
252                    as fn(&str) -> bool,
253                <NumberedMps as crate::types::multi::NumberedItems>::key_matches
254                    as fn(&str) -> bool,
255                <NumberedNets as crate::types::multi::NumberedItems>::key_matches
256                    as fn(&str) -> bool,
257                <NumberedUnuseds as crate::types::multi::NumberedItems>::key_matches
258                    as fn(&str) -> bool,
259            ];
260            array.iter().any(|f| f(input))
261        }
262        the_test as _
263    }
264}
265#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
266pub struct GetParams {
267    #[serde(
268        serialize_with = "crate::types::serialize_bool_optional",
269        deserialize_with = "crate::types::deserialize_bool_optional"
270    )]
271    #[serde(skip_serializing_if = "Option::is_none", default)]
272    #[doc = "Get current values (instead of pending values)."]
273    pub current: Option<bool>,
274    #[serde(skip_serializing_if = "Option::is_none", default)]
275    #[doc = "Fetch config values from given snapshot."]
276    pub snapshot: Option<String>,
277    #[serde(
278        flatten,
279        default,
280        skip_serializing_if = "::std::collections::HashMap::is_empty"
281    )]
282    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
283}
284#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
285pub struct PutParams {
286    #[serde(skip_serializing_if = "Option::is_none", default)]
287    #[doc = "OS architecture type."]
288    pub arch: Option<Arch>,
289    #[serde(skip_serializing_if = "Option::is_none", default)]
290    #[doc = "Console mode. By default, the console command tries to open a connection to one of the available tty devices. By setting cmode to 'console' it tries to attach to /dev/console instead. If you set cmode to 'shell', it simply invokes a shell inside the container (no login)."]
291    pub cmode: Option<Cmode>,
292    #[serde(
293        serialize_with = "crate::types::serialize_bool_optional",
294        deserialize_with = "crate::types::deserialize_bool_optional"
295    )]
296    #[serde(skip_serializing_if = "Option::is_none", default)]
297    #[doc = "Attach a console device (/dev/console) to the container."]
298    pub console: Option<bool>,
299    #[serde(
300        serialize_with = "crate::types::serialize_int_optional",
301        deserialize_with = "crate::types::deserialize_int_optional"
302    )]
303    #[serde(skip_serializing_if = "Option::is_none", default)]
304    #[doc = "The number of cores assigned to the container. A container can use all available cores by default."]
305    pub cores: Option<u64>,
306    #[serde(
307        serialize_with = "crate::types::serialize_number_optional",
308        deserialize_with = "crate::types::deserialize_number_optional"
309    )]
310    #[serde(skip_serializing_if = "Option::is_none", default)]
311    #[doc = "Limit of CPU usage.\n\nNOTE: If the computer has 2 CPUs, it has a total of '2' CPU time. Value '0' indicates no CPU limit."]
312    pub cpulimit: Option<f64>,
313    #[serde(skip_serializing_if = "Option::is_none", default)]
314    #[doc = "CPU weight for a container, will be clamped to [1, 10000] in cgroup v2."]
315    #[doc = "CPU weight for a container. Argument is used in the kernel fair scheduler. The larger the number is, the more CPU time this container gets. Number is relative to the weights of all the other running guests."]
316    pub cpuunits: Option<()>,
317    #[serde(
318        serialize_with = "crate::types::serialize_bool_optional",
319        deserialize_with = "crate::types::deserialize_bool_optional"
320    )]
321    #[serde(skip_serializing_if = "Option::is_none", default)]
322    #[doc = "Try to be more verbose. For now this only enables debug log-level on start."]
323    pub debug: Option<bool>,
324    #[serde(skip_serializing_if = "Option::is_none", default)]
325    #[doc = "A list of settings you want to delete."]
326    pub delete: Option<String>,
327    #[serde(skip_serializing_if = "Option::is_none", default)]
328    #[doc = "Description for the Container. Shown in the web-interface CT's summary. This is saved as comment inside the configuration file."]
329    pub description: Option<String>,
330    #[serde(rename = "dev[n]")]
331    #[serde(
332        serialize_with = "crate::types::serialize_multi::<NumberedDevs, _>",
333        deserialize_with = "crate::types::deserialize_multi::<NumberedDevs, _>"
334    )]
335    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
336    #[serde(flatten)]
337    #[doc = "Device to pass through to the container"]
338    pub devs: ::std::collections::HashMap<u32, String>,
339    #[serde(skip_serializing_if = "Option::is_none", default)]
340    #[doc = "Prevent changes if current configuration file has different SHA1 digest. This can be used to prevent concurrent modifications."]
341    pub digest: Option<String>,
342    #[serde(skip_serializing_if = "Option::is_none", default)]
343    #[doc = "Allow containers access to advanced features."]
344    pub features: Option<String>,
345    #[serde(skip_serializing_if = "Option::is_none", default)]
346    #[doc = "Script that will be exectued during various steps in the containers lifetime."]
347    pub hookscript: Option<String>,
348    #[serde(skip_serializing_if = "Option::is_none", default)]
349    #[doc = "Set a host name for the container."]
350    pub hostname: Option<String>,
351    #[serde(skip_serializing_if = "Option::is_none", default)]
352    #[doc = "Lock/unlock the container."]
353    pub lock: Option<Lock>,
354    #[serde(
355        serialize_with = "crate::types::serialize_int_optional",
356        deserialize_with = "crate::types::deserialize_int_optional"
357    )]
358    #[serde(skip_serializing_if = "Option::is_none", default)]
359    #[doc = "Amount of RAM for the container in MB."]
360    pub memory: Option<u64>,
361    #[serde(rename = "mp[n]")]
362    #[serde(
363        serialize_with = "crate::types::serialize_multi::<NumberedMps, _>",
364        deserialize_with = "crate::types::deserialize_multi::<NumberedMps, _>"
365    )]
366    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
367    #[serde(flatten)]
368    #[doc = "Use volume as container mount point. Use the special syntax STORAGE_ID:SIZE_IN_GiB to allocate a new volume."]
369    pub mps: ::std::collections::HashMap<u32, String>,
370    #[serde(skip_serializing_if = "Option::is_none", default)]
371    #[doc = "Sets DNS server IP address for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver."]
372    pub nameserver: Option<String>,
373    #[serde(rename = "net[n]")]
374    #[serde(
375        serialize_with = "crate::types::serialize_multi::<NumberedNets, _>",
376        deserialize_with = "crate::types::deserialize_multi::<NumberedNets, _>"
377    )]
378    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
379    #[serde(flatten)]
380    #[doc = "Specifies network interfaces for the container."]
381    pub nets: ::std::collections::HashMap<u32, String>,
382    #[serde(
383        serialize_with = "crate::types::serialize_bool_optional",
384        deserialize_with = "crate::types::deserialize_bool_optional"
385    )]
386    #[serde(skip_serializing_if = "Option::is_none", default)]
387    #[doc = "Specifies whether a container will be started during system bootup."]
388    pub onboot: Option<bool>,
389    #[serde(skip_serializing_if = "Option::is_none", default)]
390    #[doc = "OS type. This is used to setup configuration inside the container, and corresponds to lxc setup scripts in /usr/share/lxc/config/\\<ostype\\>.common.conf. Value 'unmanaged' can be used to skip and OS specific setup."]
391    pub ostype: Option<Ostype>,
392    #[serde(
393        serialize_with = "crate::types::serialize_bool_optional",
394        deserialize_with = "crate::types::deserialize_bool_optional"
395    )]
396    #[serde(skip_serializing_if = "Option::is_none", default)]
397    #[doc = "Sets the protection flag of the container. This will prevent the CT or CT's disk remove/update operation."]
398    pub protection: Option<bool>,
399    #[serde(skip_serializing_if = "Option::is_none", default)]
400    #[doc = "Revert a pending change."]
401    pub revert: Option<String>,
402    #[serde(skip_serializing_if = "Option::is_none", default)]
403    #[doc = "Use volume as container root."]
404    pub rootfs: Option<String>,
405    #[serde(skip_serializing_if = "Option::is_none", default)]
406    #[doc = "Sets DNS search domains for a container. Create will automatically use the setting from the host if you neither set searchdomain nor nameserver."]
407    pub searchdomain: Option<String>,
408    #[serde(skip_serializing_if = "Option::is_none", default)]
409    #[doc = "Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the 'up' or 'down' delay in seconds, which specifies a delay to wait before the next VM is started or stopped."]
410    pub startup: Option<String>,
411    #[serde(
412        serialize_with = "crate::types::serialize_int_optional",
413        deserialize_with = "crate::types::deserialize_int_optional"
414    )]
415    #[serde(skip_serializing_if = "Option::is_none", default)]
416    #[doc = "Amount of SWAP for the container in MB."]
417    pub swap: Option<u64>,
418    #[serde(skip_serializing_if = "Option::is_none", default)]
419    #[doc = "Tags of the Container. This is only meta information."]
420    pub tags: Option<String>,
421    #[serde(
422        serialize_with = "crate::types::serialize_bool_optional",
423        deserialize_with = "crate::types::deserialize_bool_optional"
424    )]
425    #[serde(skip_serializing_if = "Option::is_none", default)]
426    #[doc = "Enable/disable Template."]
427    pub template: Option<bool>,
428    #[serde(skip_serializing_if = "Option::is_none", default)]
429    #[doc = "Time zone to use in the container. If option isn't set, then nothing will be done. Can be set to 'host' to match the host time zone, or an arbitrary time zone option from /usr/share/zoneinfo/zone.tab"]
430    pub timezone: Option<String>,
431    #[serde(
432        serialize_with = "crate::types::serialize_int_optional",
433        deserialize_with = "crate::types::deserialize_int_optional"
434    )]
435    #[serde(skip_serializing_if = "Option::is_none", default)]
436    #[doc = "Specify the number of tty available to the container"]
437    pub tty: Option<u64>,
438    #[serde(
439        serialize_with = "crate::types::serialize_bool_optional",
440        deserialize_with = "crate::types::deserialize_bool_optional"
441    )]
442    #[serde(skip_serializing_if = "Option::is_none", default)]
443    #[doc = "Makes the container run as unprivileged user. (Should not be modified manually.)"]
444    pub unprivileged: Option<bool>,
445    #[serde(rename = "unused[n]")]
446    #[serde(
447        serialize_with = "crate::types::serialize_multi::<NumberedUnuseds, _>",
448        deserialize_with = "crate::types::deserialize_multi::<NumberedUnuseds, _>"
449    )]
450    #[serde(skip_serializing_if = "::std::collections::HashMap::is_empty", default)]
451    #[serde(flatten)]
452    #[doc = "Reference to unused volumes. This is used internally, and should not be modified manually."]
453    pub unuseds: ::std::collections::HashMap<u32, String>,
454    #[serde(
455        flatten,
456        deserialize_with = "crate::types::multi::deserialize_additional_data::<'_, PutParams, _, _>"
457    )]
458    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
459}
460impl crate::types::multi::Test for PutParams {
461    fn test_fn() -> fn(&str) -> bool {
462        fn the_test(input: &str) -> bool {
463            let array = [
464                <NumberedDevs as crate::types::multi::NumberedItems>::key_matches
465                    as fn(&str) -> bool,
466                <NumberedMps as crate::types::multi::NumberedItems>::key_matches
467                    as fn(&str) -> bool,
468                <NumberedNets as crate::types::multi::NumberedItems>::key_matches
469                    as fn(&str) -> bool,
470                <NumberedUnuseds as crate::types::multi::NumberedItems>::key_matches
471                    as fn(&str) -> bool,
472            ];
473            array.iter().any(|f| f(input))
474        }
475        the_test as _
476    }
477}
478#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
479pub enum Arch {
480    #[serde(rename = "amd64")]
481    Amd64,
482    #[serde(rename = "arm64")]
483    Arm64,
484    #[serde(rename = "armhf")]
485    Armhf,
486    #[serde(rename = "i386")]
487    I386,
488    #[serde(rename = "riscv32")]
489    Riscv32,
490    #[serde(rename = "riscv64")]
491    Riscv64,
492}
493impl Default for Arch {
494    fn default() -> Self {
495        Self::Amd64
496    }
497}
498#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
499pub enum Cmode {
500    #[serde(rename = "console")]
501    Console,
502    #[serde(rename = "shell")]
503    Shell,
504    #[serde(rename = "tty")]
505    Tty,
506}
507impl Default for Cmode {
508    fn default() -> Self {
509        Self::Tty
510    }
511}
512#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
513pub enum Lock {
514    #[serde(rename = "backup")]
515    Backup,
516    #[serde(rename = "create")]
517    Create,
518    #[serde(rename = "destroyed")]
519    Destroyed,
520    #[serde(rename = "disk")]
521    Disk,
522    #[serde(rename = "fstrim")]
523    Fstrim,
524    #[serde(rename = "migrate")]
525    Migrate,
526    #[serde(rename = "mounted")]
527    Mounted,
528    #[serde(rename = "rollback")]
529    Rollback,
530    #[serde(rename = "snapshot")]
531    Snapshot,
532    #[serde(rename = "snapshot-delete")]
533    SnapshotDelete,
534}
535#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
536pub enum Ostype {
537    #[serde(rename = "alpine")]
538    Alpine,
539    #[serde(rename = "archlinux")]
540    Archlinux,
541    #[serde(rename = "centos")]
542    Centos,
543    #[serde(rename = "debian")]
544    Debian,
545    #[serde(rename = "devuan")]
546    Devuan,
547    #[serde(rename = "fedora")]
548    Fedora,
549    #[serde(rename = "gentoo")]
550    Gentoo,
551    #[serde(rename = "nixos")]
552    Nixos,
553    #[serde(rename = "opensuse")]
554    Opensuse,
555    #[serde(rename = "ubuntu")]
556    Ubuntu,
557    #[serde(rename = "unmanaged")]
558    Unmanaged,
559}
560#[derive(Default)]
561struct NumberedDevs;
562impl crate::types::multi::NumberedItems for NumberedDevs {
563    type Item = String;
564    const PREFIX: &'static str = "dev";
565}
566#[derive(Default)]
567struct NumberedMps;
568impl crate::types::multi::NumberedItems for NumberedMps {
569    type Item = String;
570    const PREFIX: &'static str = "mp";
571}
572#[derive(Default)]
573struct NumberedNets;
574impl crate::types::multi::NumberedItems for NumberedNets {
575    type Item = String;
576    const PREFIX: &'static str = "net";
577}
578#[derive(Default)]
579struct NumberedUnuseds;
580impl crate::types::multi::NumberedItems for NumberedUnuseds {
581    type Item = String;
582    const PREFIX: &'static str = "unused";
583}