proxmox_api/generated/nodes/node/qemu/vmid/
monitor.rs1pub struct MonitorClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> MonitorClient<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, "/monitor"),
13 }
14 }
15}
16impl<T> MonitorClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Execute QEMU monitor commands."]
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}
26impl PostParams {
27 pub fn new(command: String) -> Self {
28 Self {
29 command,
30 additional_properties: Default::default(),
31 }
32 }
33}
34#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
35pub struct PostParams {
36 #[doc = "The monitor command."]
37 pub command: String,
38 #[serde(
39 flatten,
40 default,
41 skip_serializing_if = "::std::collections::HashMap::is_empty"
42 )]
43 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
44}