Skip to main content

proxmox_api/generated/nodes/node/ceph/cfg/
db.rs

1#[derive(Debug, Clone)]
2pub struct DbClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> DbClient<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, "/db"),
14        }
15    }
16}
17impl<T> DbClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "Get the Ceph configuration database."]
22    #[doc = ""]
23    #[doc = "Permission check: perm(\"/\", [\"Sys.Audit\", \"Datastore.Audit\"], any)"]
24    pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
25        let path = self.path.to_string();
26        let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
27        Ok(optional_vec.unwrap_or_default())
28    }
29}
30impl GetOutputItems {
31    pub fn new(
32        can_update_at_runtime: bool,
33        level: String,
34        mask: String,
35        name: String,
36        section: String,
37        value: String,
38    ) -> Self {
39        Self {
40            can_update_at_runtime,
41            level,
42            mask,
43            name,
44            section,
45            value,
46            additional_properties: ::std::default::Default::default(),
47        }
48    }
49}
50#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
51pub struct GetOutputItems {
52    #[serde(
53        serialize_with = "crate::types::serialize_bool",
54        deserialize_with = "crate::types::deserialize_bool"
55    )]
56    pub can_update_at_runtime: bool,
57    pub level: String,
58    pub mask: String,
59    pub name: String,
60    pub section: String,
61    pub value: String,
62    #[serde(
63        flatten,
64        default,
65        skip_serializing_if = "::std::collections::HashMap::is_empty"
66    )]
67    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
68}