proxmox_api/generated/nodes/node/
hardware.rs

1pub mod pci;
2pub mod usb;
3pub struct HardwareClient<T> {
4    client: T,
5    path: String,
6}
7impl<T> HardwareClient<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, "/hardware"),
15        }
16    }
17}
18impl<T> HardwareClient<T>
19where
20    T: crate::client::Client,
21{
22    #[doc = "Index of hardware types"]
23    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
24        let path = self.path.to_string();
25        self.client.get(&path, &())
26    }
27}
28impl GetOutputItems {
29    pub fn new(ty: String) -> Self {
30        Self {
31            ty,
32            additional_properties: Default::default(),
33        }
34    }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
37pub struct GetOutputItems {
38    #[serde(rename = "type")]
39    pub ty: String,
40    #[serde(
41        flatten,
42        default,
43        skip_serializing_if = "::std::collections::HashMap::is_empty"
44    )]
45    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
46}
47impl<T> HardwareClient<T>
48where
49    T: crate::client::Client,
50{
51    pub fn pci(&self) -> pci::PciClient<T> {
52        pci::PciClient::<T>::new(self.client.clone(), &self.path)
53    }
54}
55impl<T> HardwareClient<T>
56where
57    T: crate::client::Client,
58{
59    pub fn usb(&self) -> usb::UsbClient<T> {
60        usb::UsbClient::<T>::new(self.client.clone(), &self.path)
61    }
62}