proxmox_api/generated/nodes/node/tasks/
upid.rs1pub mod log;
2pub mod status;
3pub struct UpidClient<T> {
4 client: T,
5 path: String,
6}
7impl<T> UpidClient<T>
8where
9 T: crate::client::Client,
10{
11 pub fn new(client: T, parent_path: &str, upid: &str) -> Self {
12 Self {
13 client,
14 path: format!("{}/{}", parent_path, upid),
15 }
16 }
17}
18impl<T> UpidClient<T>
19where
20 T: crate::client::Client,
21{
22 #[doc = "Stop a task."]
23 pub fn delete(&self) -> Result<(), T::Error> {
24 let path = self.path.to_string();
25 self.client.delete(&path, &())
26 }
27}
28impl<T> UpidClient<T>
29where
30 T: crate::client::Client,
31{
32 #[doc = ""]
33 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
34 let path = self.path.to_string();
35 self.client.get(&path, &())
36 }
37}
38#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
39pub struct GetOutputItems {
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> UpidClient<T>
48where
49 T: crate::client::Client,
50{
51 pub fn log(&self) -> log::LogClient<T> {
52 log::LogClient::<T>::new(self.client.clone(), &self.path)
53 }
54}
55impl<T> UpidClient<T>
56where
57 T: crate::client::Client,
58{
59 pub fn status(&self) -> status::StatusClient<T> {
60 status::StatusClient::<T>::new(self.client.clone(), &self.path)
61 }
62}