proxmox_api/generated/nodes/node/capabilities/qemu/
cpu.rs1pub struct CpuClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> CpuClient<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, "/cpu"),
13 }
14 }
15}
16impl<T> CpuClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "List all custom and default CPU models."]
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(custom: bool, name: String, vendor: String) -> Self {
28 Self {
29 custom,
30 name,
31 vendor,
32 additional_properties: Default::default(),
33 }
34 }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
37pub struct GetOutputItems {
38 #[serde(
39 serialize_with = "crate::types::serialize_bool",
40 deserialize_with = "crate::types::deserialize_bool"
41 )]
42 #[doc = "True if this is a custom CPU model."]
43 pub custom: bool,
44 #[doc = "Name of the CPU model. Identifies it for subsequent API calls. Prefixed with 'custom-' for custom models."]
45 pub name: String,
46 #[doc = "CPU vendor visible to the guest when this model is selected. Vendor of 'reported-model' in case of custom models."]
47 pub vendor: String,
48 #[serde(
49 flatten,
50 default,
51 skip_serializing_if = "::std::collections::HashMap::is_empty"
52 )]
53 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
54}