proxmox_api/generated/nodes/node/ceph/osd/
osdid.rs

1pub mod in_name;
2pub mod lv_info;
3pub mod metadata;
4pub mod out;
5pub mod scrub;
6pub struct OsdidClient<T> {
7    client: T,
8    path: String,
9}
10impl<T> OsdidClient<T>
11where
12    T: crate::client::Client,
13{
14    pub fn new(client: T, parent_path: &str, osdid: &str) -> Self {
15        Self {
16            client,
17            path: format!("{}/{}", parent_path, osdid),
18        }
19    }
20}
21impl<T> OsdidClient<T>
22where
23    T: crate::client::Client,
24{
25    #[doc = "Destroy OSD"]
26    pub fn delete(&self, params: DeleteParams) -> Result<String, T::Error> {
27        let path = self.path.to_string();
28        self.client.delete(&path, &params)
29    }
30}
31impl<T> OsdidClient<T>
32where
33    T: crate::client::Client,
34{
35    #[doc = "OSD index."]
36    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
37        let path = self.path.to_string();
38        self.client.get(&path, &())
39    }
40}
41#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
42pub struct DeleteParams {
43    #[serde(
44        serialize_with = "crate::types::serialize_bool_optional",
45        deserialize_with = "crate::types::deserialize_bool_optional"
46    )]
47    #[serde(skip_serializing_if = "Option::is_none", default)]
48    #[doc = "If set, we remove partition table entries."]
49    pub cleanup: Option<bool>,
50    #[serde(
51        flatten,
52        default,
53        skip_serializing_if = "::std::collections::HashMap::is_empty"
54    )]
55    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
56}
57#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
58pub struct GetOutputItems {
59    #[serde(
60        flatten,
61        default,
62        skip_serializing_if = "::std::collections::HashMap::is_empty"
63    )]
64    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
65}
66impl<T> OsdidClient<T>
67where
68    T: crate::client::Client,
69{
70    pub fn metadata(&self) -> metadata::MetadataClient<T> {
71        metadata::MetadataClient::<T>::new(self.client.clone(), &self.path)
72    }
73}
74impl<T> OsdidClient<T>
75where
76    T: crate::client::Client,
77{
78    pub fn lv_info(&self) -> lv_info::LvInfoClient<T> {
79        lv_info::LvInfoClient::<T>::new(self.client.clone(), &self.path)
80    }
81}
82impl<T> OsdidClient<T>
83where
84    T: crate::client::Client,
85{
86    pub fn in_name(&self) -> in_name::InNameClient<T> {
87        in_name::InNameClient::<T>::new(self.client.clone(), &self.path)
88    }
89}
90impl<T> OsdidClient<T>
91where
92    T: crate::client::Client,
93{
94    pub fn out(&self) -> out::OutClient<T> {
95        out::OutClient::<T>::new(self.client.clone(), &self.path)
96    }
97}
98impl<T> OsdidClient<T>
99where
100    T: crate::client::Client,
101{
102    pub fn scrub(&self) -> scrub::ScrubClient<T> {
103        scrub::ScrubClient::<T>::new(self.client.clone(), &self.path)
104    }
105}