proxmox_api/generated/nodes/node/ceph/
mds.rs

1pub mod name;
2pub struct MdsClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> MdsClient<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, "/mds"),
14        }
15    }
16}
17impl<T> MdsClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "MDS 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            rank: Default::default(),
34            standby_replay: Default::default(),
35            additional_properties: Default::default(),
36        }
37    }
38}
39#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
40pub struct GetOutputItems {
41    #[serde(skip_serializing_if = "Option::is_none", default)]
42    pub addr: Option<String>,
43    #[serde(skip_serializing_if = "Option::is_none", default)]
44    pub host: Option<String>,
45    #[serde(
46        serialize_with = "crate::types::serialize_int_optional",
47        deserialize_with = "crate::types::deserialize_int_optional"
48    )]
49    #[serde(skip_serializing_if = "Option::is_none", default)]
50    pub rank: Option<u64>,
51    #[serde(
52        serialize_with = "crate::types::serialize_bool_optional",
53        deserialize_with = "crate::types::deserialize_bool_optional"
54    )]
55    #[serde(skip_serializing_if = "Option::is_none", default)]
56    #[doc = "If true, the standby MDS is polling the active MDS for faster recovery (hot standby)."]
57    pub standby_replay: Option<bool>,
58    #[doc = "State of the MDS"]
59    pub state: String,
60    #[serde(
61        flatten,
62        default,
63        skip_serializing_if = "::std::collections::HashMap::is_empty"
64    )]
65    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
66}
67impl<T> MdsClient<T>
68where
69    T: crate::client::Client,
70{
71    pub fn name(&self, name: &str) -> name::NameClient<T> {
72        name::NameClient::<T>::new(self.client.clone(), &self.path, name)
73    }
74}