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

1pub struct StopClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> StopClient<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, "/stop"),
13        }
14    }
15}
16impl<T> StopClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Stop virtual machine. The qemu process will exit immediately. Thisis akin to pulling the power plug of a running computer and may damage the VM data"]
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 = "keepActive")]
29    #[serde(
30        serialize_with = "crate::types::serialize_bool_optional",
31        deserialize_with = "crate::types::deserialize_bool_optional"
32    )]
33    #[serde(skip_serializing_if = "Option::is_none", default)]
34    #[doc = "Do not deactivate storage volumes."]
35    pub keepactive: Option<bool>,
36    #[serde(skip_serializing_if = "Option::is_none", default)]
37    #[doc = "The cluster node name."]
38    pub migratedfrom: Option<String>,
39    #[serde(
40        serialize_with = "crate::types::serialize_bool_optional",
41        deserialize_with = "crate::types::deserialize_bool_optional"
42    )]
43    #[serde(skip_serializing_if = "Option::is_none", default)]
44    #[doc = "Ignore locks - only root is allowed to use this option."]
45    pub skiplock: Option<bool>,
46    #[serde(
47        serialize_with = "crate::types::serialize_int_optional",
48        deserialize_with = "crate::types::deserialize_int_optional"
49    )]
50    #[serde(skip_serializing_if = "Option::is_none", default)]
51    #[doc = "Wait maximal timeout seconds."]
52    pub timeout: Option<u64>,
53    #[serde(
54        flatten,
55        default,
56        skip_serializing_if = "::std::collections::HashMap::is_empty"
57    )]
58    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
59}