proxmox_api/generated/nodes/node/qemu/vmid/cloudinit/
dump.rs

1pub struct DumpClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> DumpClient<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, "/dump"),
13        }
14    }
15}
16impl<T> DumpClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Get automatically generated cloudinit config."]
21    pub fn get(&self, params: GetParams) -> Result<String, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &params)
24    }
25}
26impl GetParams {
27    pub fn new(ty: Type) -> Self {
28        Self {
29            ty,
30            additional_properties: Default::default(),
31        }
32    }
33}
34#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
35pub struct GetParams {
36    #[serde(rename = "type")]
37    #[doc = "Config type."]
38    pub ty: Type,
39    #[serde(
40        flatten,
41        default,
42        skip_serializing_if = "::std::collections::HashMap::is_empty"
43    )]
44    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
45}
46#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
47pub enum Type {
48    #[serde(rename = "meta")]
49    Meta,
50    #[serde(rename = "network")]
51    Network,
52    #[serde(rename = "user")]
53    User,
54}