Skip to main content

netbox_openapi/models/
virtual_machine_with_config_context_start_on_boot.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#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct VirtualMachineWithConfigContextStartOnBoot {
13    /// * `on` - On * `off` - Off * `laststate` - Last State
14    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
15    pub value: Option<Value>,
16    #[serde(rename = "label", skip_serializing_if = "Option::is_none")]
17    pub label: Option<Label>,
18}
19
20impl VirtualMachineWithConfigContextStartOnBoot {
21    pub fn new() -> VirtualMachineWithConfigContextStartOnBoot {
22        VirtualMachineWithConfigContextStartOnBoot {
23            value: None,
24            label: None,
25        }
26    }
27}
28
29/// * `on` - On * `off` - Off * `laststate` - Last State
30#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
31pub enum Value {
32    #[serde(rename = "on")]
33    On,
34    #[serde(rename = "off")]
35    Off,
36    #[serde(rename = "laststate")]
37    Laststate,
38}
39
40impl Default for Value {
41    fn default() -> Value {
42        Self::On
43    }
44}
45///
46#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
47pub enum Label {
48    #[serde(rename = "On")]
49    On,
50    #[serde(rename = "Off")]
51    Off,
52    #[serde(rename = "Last State")]
53    LastState,
54}
55
56impl Default for Label {
57    fn default() -> Label {
58        Self::On
59    }
60}