proxmox_api/generated/nodes/node/capabilities/qemu/
machines.rs

1pub struct MachinesClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> MachinesClient<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, "/machines"),
13        }
14    }
15}
16impl<T> MachinesClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get available QEMU/KVM machine types."]
21    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &())
24    }
25}
26impl GetOutputItems {
27    pub fn new(id: String, ty: Type, version: String) -> Self {
28        Self {
29            id,
30            ty,
31            version,
32            additional_properties: Default::default(),
33        }
34    }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
37pub struct GetOutputItems {
38    #[doc = "Full name of machine type and version."]
39    pub id: String,
40    #[serde(rename = "type")]
41    #[doc = "The machine type."]
42    pub ty: Type,
43    #[doc = "The machine version."]
44    pub version: String,
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}
52#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
53pub enum Type {
54    #[serde(rename = "i440fx")]
55    I440fx,
56    #[serde(rename = "q35")]
57    Q35,
58}