proxmox_api/generated/nodes/node/capabilities/qemu/
cpu_flags.rs1#[derive(Debug, Clone)]
2pub struct CpuFlagsClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> CpuFlagsClient<T>
7where
8 T: crate::client::Client,
9{
10 pub fn new(client: T, parent_path: &str) -> Self {
11 Self {
12 client,
13 path: format!("{}{}", parent_path, "/cpu-flags"),
14 }
15 }
16}
17impl<T> CpuFlagsClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "List of available VM-specific CPU flags."]
22 #[doc = ""]
23 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
24 let path = self.path.to_string();
25 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
26 Ok(optional_vec.unwrap_or_default())
27 }
28}
29impl GetOutputItems {
30 pub fn new(description: String, name: String) -> Self {
31 Self {
32 description,
33 name,
34 additional_properties: ::std::default::Default::default(),
35 }
36 }
37}
38#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
39pub struct GetOutputItems {
40 #[doc = "Description of the CPU flag."]
41 #[doc = ""]
42 pub description: String,
43 #[doc = "Name of the CPU flag."]
44 #[doc = ""]
45 pub name: String,
46 #[serde(
47 flatten,
48 default,
49 skip_serializing_if = "::std::collections::HashMap::is_empty"
50 )]
51 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
52}