proxmox_api/generated/nodes/node/qemu/vmid/status/
suspend.rs1pub struct SuspendClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> SuspendClient<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, "/suspend"),
13 }
14 }
15}
16impl<T> SuspendClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Suspend 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, ¶ms)
24 }
25}
26#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
27pub struct PostParams {
28 #[serde(
29 serialize_with = "crate::types::serialize_bool_optional",
30 deserialize_with = "crate::types::deserialize_bool_optional"
31 )]
32 #[serde(skip_serializing_if = "Option::is_none", default)]
33 #[doc = "Ignore locks - only root is allowed to use this option."]
34 pub skiplock: Option<bool>,
35 #[serde(skip_serializing_if = "Option::is_none", default)]
36 #[doc = "The storage for the VM state"]
37 pub statestorage: Option<String>,
38 #[serde(
39 serialize_with = "crate::types::serialize_bool_optional",
40 deserialize_with = "crate::types::deserialize_bool_optional"
41 )]
42 #[serde(skip_serializing_if = "Option::is_none", default)]
43 #[doc = "If set, suspends the VM to disk. Will be resumed on next VM start."]
44 pub todisk: Option<bool>,
45 #[serde(
46 flatten,
47 default,
48 skip_serializing_if = "::std::collections::HashMap::is_empty"
49 )]
50 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
51}