proxmox_api/generated/nodes/node/ceph/
fs.rs1pub mod name;
2#[derive(Debug, Clone)]
3pub struct FsClient<T> {
4 client: T,
5 path: String,
6}
7impl<T> FsClient<T>
8where
9 T: crate::client::Client,
10{
11 pub fn new(client: T, parent_path: &str) -> Self {
12 Self {
13 client,
14 path: format!("{}{}", parent_path, "/fs"),
15 }
16 }
17}
18impl<T> FsClient<T>
19where
20 T: crate::client::Client,
21{
22 #[doc = "Directory index."]
23 #[doc = ""]
24 #[doc = "Permission check: perm(\"/\", [\"Sys.Audit\", \"Datastore.Audit\"], any)"]
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}
31impl GetOutputItems {
32 pub fn new(data_pool: String, metadata_pool: String, name: String) -> Self {
33 Self {
34 data_pool,
35 metadata_pool,
36 name,
37 additional_properties: ::std::default::Default::default(),
38 }
39 }
40}
41#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
42pub struct GetOutputItems {
43 #[doc = "The name of the data pool."]
44 #[doc = ""]
45 pub data_pool: String,
46 #[doc = "The name of the metadata pool."]
47 #[doc = ""]
48 pub metadata_pool: String,
49 #[doc = "The ceph filesystem name."]
50 #[doc = ""]
51 pub name: String,
52 #[serde(
53 flatten,
54 default,
55 skip_serializing_if = "::std::collections::HashMap::is_empty"
56 )]
57 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
58}
59impl<T> FsClient<T>
60where
61 T: crate::client::Client,
62{
63 pub fn name(&self, name: &str) -> name::NameClient<T> {
64 name::NameClient::<T>::new(self.client.clone(), &self.path, name)
65 }
66}