proxmox_api/generated/nodes/node/qemu/vmid/status/
start.rs

1pub struct StartClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> StartClient<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, "/start"),
13        }
14    }
15}
16impl<T> StartClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Start virtual machine."]
21    pub fn post(&self, params: PostParams) -> Result<String, T::Error> {
22        let path = self.path.to_string();
23        self.client.post(&path, &params)
24    }
25}
26#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
27pub struct PostParams {
28    #[serde(rename = "force-cpu")]
29    #[serde(skip_serializing_if = "Option::is_none", default)]
30    #[doc = "Override QEMU's -cpu argument with the given string."]
31    pub force_cpu: Option<String>,
32    #[serde(skip_serializing_if = "Option::is_none", default)]
33    #[doc = "Specifies the QEMU machine type."]
34    pub machine: Option<String>,
35    #[serde(skip_serializing_if = "Option::is_none", default)]
36    #[doc = "The cluster node name."]
37    pub migratedfrom: Option<String>,
38    #[serde(skip_serializing_if = "Option::is_none", default)]
39    #[doc = "CIDR of the (sub) network that is used for migration."]
40    pub migration_network: Option<String>,
41    #[serde(skip_serializing_if = "Option::is_none", default)]
42    #[doc = "Migration traffic is encrypted using an SSH tunnel by default. On secure, completely private networks this can be disabled to increase performance."]
43    pub migration_type: Option<MigrationType>,
44    #[serde(
45        serialize_with = "crate::types::serialize_bool_optional",
46        deserialize_with = "crate::types::deserialize_bool_optional"
47    )]
48    #[serde(skip_serializing_if = "Option::is_none", default)]
49    #[doc = "Ignore locks - only root is allowed to use this option."]
50    pub skiplock: Option<bool>,
51    #[serde(skip_serializing_if = "Option::is_none", default)]
52    #[doc = "Some command save/restore state from this location."]
53    pub stateuri: Option<String>,
54    #[serde(skip_serializing_if = "Option::is_none", default)]
55    #[doc = "Mapping from source to target storages. Providing only a single storage ID maps all source storages to that storage. Providing the special value '1' will map each source storage to itself."]
56    pub targetstorage: Option<String>,
57    #[serde(skip_serializing_if = "Option::is_none", default)]
58    #[doc = "Wait maximal timeout seconds."]
59    pub timeout: Option<()>,
60    #[serde(
61        flatten,
62        default,
63        skip_serializing_if = "::std::collections::HashMap::is_empty"
64    )]
65    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
66}
67#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
68pub enum MigrationType {
69    #[serde(rename = "insecure")]
70    Insecure,
71    #[serde(rename = "secure")]
72    Secure,
73}