Skip to main content

proxmox_api/generated/nodes/node/vzdump/
extractconfig.rs

1#[derive(Debug, Clone)]
2pub struct ExtractconfigClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> ExtractconfigClient<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, "/extractconfig"),
14        }
15    }
16}
17impl<T> ExtractconfigClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "Extract configuration from vzdump backup archive."]
22    #[doc = ""]
23    #[doc = "The user needs 'VM.Backup' permissions on the backed up guest ID, and 'Datastore.AllocateSpace' on the backup storage."]
24    pub async fn get(&self, params: GetParams) -> Result<String, T::Error> {
25        let path = self.path.to_string();
26        self.client.get(&path, &params).await
27    }
28}
29impl GetParams {
30    pub fn new(volume: String) -> Self {
31        Self {
32            volume,
33            additional_properties: ::std::default::Default::default(),
34        }
35    }
36}
37#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
38pub struct GetParams {
39    #[doc = "Volume identifier"]
40    #[doc = ""]
41    pub volume: String,
42    #[serde(
43        flatten,
44        default,
45        skip_serializing_if = "::std::collections::HashMap::is_empty"
46    )]
47    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
48}