proxmox_api/generated/cluster/ha/
status.rs1pub mod current;
2pub mod manager_status;
3#[derive(Debug, Clone)]
4pub struct StatusClient<T> {
5 client: T,
6 path: String,
7}
8impl<T> StatusClient<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, "/status"),
16 }
17 }
18}
19impl<T> StatusClient<T>
20where
21 T: crate::client::Client,
22{
23 #[doc = "Directory index."]
24 #[doc = ""]
25 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
26 let path = self.path.to_string();
27 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
28 Ok(optional_vec.unwrap_or_default())
29 }
30}
31#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
32pub struct GetOutputItems {
33 #[serde(
34 flatten,
35 default,
36 skip_serializing_if = "::std::collections::HashMap::is_empty"
37 )]
38 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
39}
40impl<T> StatusClient<T>
41where
42 T: crate::client::Client,
43{
44 pub fn current(&self) -> current::CurrentClient<T> {
45 current::CurrentClient::<T>::new(self.client.clone(), &self.path)
46 }
47}
48impl<T> StatusClient<T>
49where
50 T: crate::client::Client,
51{
52 pub fn manager_status(&self) -> manager_status::ManagerStatusClient<T> {
53 manager_status::ManagerStatusClient::<T>::new(self.client.clone(), &self.path)
54 }
55}