Skip to main content

proxmox_api/generated/nodes/node/
capabilities.rs

1pub mod qemu;
2#[derive(Debug, Clone)]
3pub struct CapabilitiesClient<T> {
4    client: T,
5    path: String,
6}
7impl<T> CapabilitiesClient<T>
8where
9    T: crate::client::Client,
10{
11    pub fn new(client: T, parent_path: &str) -> Self {
12        Self {
13            client,
14            path: format!("{}{}", parent_path, "/capabilities"),
15        }
16    }
17}
18impl<T> CapabilitiesClient<T>
19where
20    T: crate::client::Client,
21{
22    #[doc = "Node capabilities index."]
23    #[doc = ""]
24    pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
25        let path = self.path.to_string();
26        let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
27        Ok(optional_vec.unwrap_or_default())
28    }
29}
30#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
31pub struct GetOutputItems {
32    #[serde(
33        flatten,
34        default,
35        skip_serializing_if = "::std::collections::HashMap::is_empty"
36    )]
37    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
38}
39impl<T> CapabilitiesClient<T>
40where
41    T: crate::client::Client,
42{
43    pub fn qemu(&self) -> qemu::QemuClient<T> {
44        qemu::QemuClient::<T>::new(self.client.clone(), &self.path)
45    }
46}