proxmox_api/generated/cluster/
jobs.rs

1pub mod realm_sync;
2pub mod schedule_analyze;
3pub struct JobsClient<T> {
4    client: T,
5    path: String,
6}
7impl<T> JobsClient<T>
8where
9    T: crate::client::Client,
10{
11    pub fn new(client: T, parent_path: &str) -> Self {
12        Self {
13            client,
14            path: format!("{}{}", parent_path, "/jobs"),
15        }
16    }
17}
18impl<T> JobsClient<T>
19where
20    T: crate::client::Client,
21{
22    #[doc = "Index for jobs related endpoints."]
23    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
24        let path = self.path.to_string();
25        self.client.get(&path, &())
26    }
27}
28impl GetOutputItems {
29    pub fn new(subdir: String) -> Self {
30        Self {
31            subdir,
32            additional_properties: Default::default(),
33        }
34    }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
37pub struct GetOutputItems {
38    #[doc = "API sub-directory endpoint"]
39    pub subdir: String,
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> JobsClient<T>
48where
49    T: crate::client::Client,
50{
51    pub fn realm_sync(&self) -> realm_sync::RealmSyncClient<T> {
52        realm_sync::RealmSyncClient::<T>::new(self.client.clone(), &self.path)
53    }
54}
55impl<T> JobsClient<T>
56where
57    T: crate::client::Client,
58{
59    pub fn schedule_analyze(&self) -> schedule_analyze::ScheduleAnalyzeClient<T> {
60        schedule_analyze::ScheduleAnalyzeClient::<T>::new(self.client.clone(), &self.path)
61    }
62}