proxmox_api/generated/nodes/node/ceph/
mgr.rs1pub mod id;
2pub struct MgrClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> MgrClient<T>
7where
8 T: crate::client::Client,
9{
10 pub fn new(client: T, parent_path: &str) -> Self {
11 Self {
12 client,
13 path: format!("{}{}", parent_path, "/mgr"),
14 }
15 }
16}
17impl<T> MgrClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "MGR directory index."]
22 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
23 let path = self.path.to_string();
24 self.client.get(&path, &())
25 }
26}
27impl GetOutputItems {
28 pub fn new(state: String) -> Self {
29 Self {
30 state,
31 addr: Default::default(),
32 host: Default::default(),
33 additional_properties: Default::default(),
34 }
35 }
36}
37#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
38pub struct GetOutputItems {
39 #[serde(skip_serializing_if = "Option::is_none", default)]
40 pub addr: Option<String>,
41 #[serde(skip_serializing_if = "Option::is_none", default)]
42 pub host: Option<String>,
43 #[doc = "State of the MGR"]
44 pub state: String,
45 #[serde(
46 flatten,
47 default,
48 skip_serializing_if = "::std::collections::HashMap::is_empty"
49 )]
50 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
51}
52impl<T> MgrClient<T>
53where
54 T: crate::client::Client,
55{
56 pub fn id(&self, id: &str) -> id::IdClient<T> {
57 id::IdClient::<T>::new(self.client.clone(), &self.path, id)
58 }
59}