Skip to main content

proxmox_api/generated/cluster/
ceph.rs

1pub mod flags;
2pub mod metadata;
3pub mod status;
4#[derive(Debug, Clone)]
5pub struct CephClient<T> {
6    client: T,
7    path: String,
8}
9impl<T> CephClient<T>
10where
11    T: crate::client::Client,
12{
13    pub fn new(client: T, parent_path: &str) -> Self {
14        Self {
15            client,
16            path: format!("{}{}", parent_path, "/ceph"),
17        }
18    }
19}
20impl<T> CephClient<T>
21where
22    T: crate::client::Client,
23{
24    #[doc = "Cluster ceph index."]
25    #[doc = ""]
26    pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
27        let path = self.path.to_string();
28        let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
29        Ok(optional_vec.unwrap_or_default())
30    }
31}
32#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
33pub struct GetOutputItems {
34    #[serde(
35        flatten,
36        default,
37        skip_serializing_if = "::std::collections::HashMap::is_empty"
38    )]
39    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
40}
41impl<T> CephClient<T>
42where
43    T: crate::client::Client,
44{
45    pub fn metadata(&self) -> metadata::MetadataClient<T> {
46        metadata::MetadataClient::<T>::new(self.client.clone(), &self.path)
47    }
48}
49impl<T> CephClient<T>
50where
51    T: crate::client::Client,
52{
53    pub fn status(&self) -> status::StatusClient<T> {
54        status::StatusClient::<T>::new(self.client.clone(), &self.path)
55    }
56}
57impl<T> CephClient<T>
58where
59    T: crate::client::Client,
60{
61    pub fn flags(&self) -> flags::FlagsClient<T> {
62        flags::FlagsClient::<T>::new(self.client.clone(), &self.path)
63    }
64}