proxmox_api/generated/cluster/
tasks.rs1pub struct TasksClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> TasksClient<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, "/tasks"),
13 }
14 }
15}
16impl<T> TasksClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "List recent tasks (cluster wide)."]
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(upid: String) -> Self {
28 Self {
29 upid,
30 additional_properties: Default::default(),
31 }
32 }
33}
34#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
35pub struct GetOutputItems {
36 pub upid: String,
37 #[serde(
38 flatten,
39 default,
40 skip_serializing_if = "::std::collections::HashMap::is_empty"
41 )]
42 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
43}