proxmox_api/generated/cluster/
ha.rs

1pub mod groups;
2pub mod resources;
3pub mod status;
4pub struct HaClient<T> {
5    client: T,
6    path: String,
7}
8impl<T> HaClient<T>
9where
10    T: crate::client::Client,
11{
12    pub fn new(client: T, parent_path: &str) -> Self {
13        Self {
14            client,
15            path: format!("{}{}", parent_path, "/ha"),
16        }
17    }
18}
19impl<T> HaClient<T>
20where
21    T: crate::client::Client,
22{
23    #[doc = "Directory index."]
24    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
25        let path = self.path.to_string();
26        self.client.get(&path, &())
27    }
28}
29impl GetOutputItems {
30    pub fn new(id: String) -> Self {
31        Self {
32            id,
33            additional_properties: Default::default(),
34        }
35    }
36}
37#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
38pub struct GetOutputItems {
39    pub id: 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> HaClient<T>
48where
49    T: crate::client::Client,
50{
51    pub fn resources(&self) -> resources::ResourcesClient<T> {
52        resources::ResourcesClient::<T>::new(self.client.clone(), &self.path)
53    }
54}
55impl<T> HaClient<T>
56where
57    T: crate::client::Client,
58{
59    pub fn groups(&self) -> groups::GroupsClient<T> {
60        groups::GroupsClient::<T>::new(self.client.clone(), &self.path)
61    }
62}
63impl<T> HaClient<T>
64where
65    T: crate::client::Client,
66{
67    pub fn status(&self) -> status::StatusClient<T> {
68        status::StatusClient::<T>::new(self.client.clone(), &self.path)
69    }
70}