proxmox_api/generated/nodes/node/qemu/vmid/snapshot/snapname/
config.rs

1pub struct ConfigClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> ConfigClient<T>
6where
7    T: crate::client::Client,
8{
9    pub fn new(client: T, parent_path: &str) -> Self {
10        Self {
11            client,
12            path: format!("{}{}", parent_path, "/config"),
13        }
14    }
15}
16impl<T> ConfigClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get snapshot configuration"]
21    pub fn get(&self) -> Result<GetOutput, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &())
24    }
25}
26impl<T> ConfigClient<T>
27where
28    T: crate::client::Client,
29{
30    #[doc = "Update snapshot metadata."]
31    pub fn put(&self, params: PutParams) -> Result<(), T::Error> {
32        let path = self.path.to_string();
33        self.client.put(&path, &params)
34    }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
37pub struct GetOutput {
38    #[serde(
39        flatten,
40        default,
41        skip_serializing_if = "::std::collections::HashMap::is_empty"
42    )]
43    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
44}
45#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
46pub struct PutParams {
47    #[serde(skip_serializing_if = "Option::is_none", default)]
48    #[doc = "A textual description or comment."]
49    pub description: Option<String>,
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}