proxmox_api/generated/nodes/node/capabilities/
qemu.rs1pub mod cpu;
2pub mod cpu_flags;
3pub mod machines;
4pub mod migration;
5#[derive(Debug, Clone)]
6pub struct QemuClient<T> {
7 client: T,
8 path: String,
9}
10impl<T> QemuClient<T>
11where
12 T: crate::client::Client,
13{
14 pub fn new(client: T, parent_path: &str) -> Self {
15 Self {
16 client,
17 path: format!("{}{}", parent_path, "/qemu"),
18 }
19 }
20}
21impl<T> QemuClient<T>
22where
23 T: crate::client::Client,
24{
25 #[doc = "QEMU capabilities index."]
26 #[doc = ""]
27 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
28 let path = self.path.to_string();
29 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
30 Ok(optional_vec.unwrap_or_default())
31 }
32}
33#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
34pub struct GetOutputItems {
35 #[serde(
36 flatten,
37 default,
38 skip_serializing_if = "::std::collections::HashMap::is_empty"
39 )]
40 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
41}
42impl<T> QemuClient<T>
43where
44 T: crate::client::Client,
45{
46 pub fn cpu(&self) -> cpu::CpuClient<T> {
47 cpu::CpuClient::<T>::new(self.client.clone(), &self.path)
48 }
49}
50impl<T> QemuClient<T>
51where
52 T: crate::client::Client,
53{
54 pub fn cpu_flags(&self) -> cpu_flags::CpuFlagsClient<T> {
55 cpu_flags::CpuFlagsClient::<T>::new(self.client.clone(), &self.path)
56 }
57}
58impl<T> QemuClient<T>
59where
60 T: crate::client::Client,
61{
62 pub fn machines(&self) -> machines::MachinesClient<T> {
63 machines::MachinesClient::<T>::new(self.client.clone(), &self.path)
64 }
65}
66impl<T> QemuClient<T>
67where
68 T: crate::client::Client,
69{
70 pub fn migration(&self) -> migration::MigrationClient<T> {
71 migration::MigrationClient::<T>::new(self.client.clone(), &self.path)
72 }
73}