proxmox_api/generated/nodes/node/
aplinfo.rs1pub struct AplinfoClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> AplinfoClient<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, "/aplinfo"),
13 }
14 }
15}
16impl<T> AplinfoClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Get list of appliances."]
21 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
22 let path = self.path.to_string();
23 self.client.get(&path, &())
24 }
25}
26impl<T> AplinfoClient<T>
27where
28 T: crate::client::Client,
29{
30 #[doc = "Download appliance templates."]
31 pub fn post(&self, params: PostParams) -> Result<String, T::Error> {
32 let path = self.path.to_string();
33 self.client.post(&path, ¶ms)
34 }
35}
36#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
37pub struct GetOutputItems {
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}
45impl PostParams {
46 pub fn new(storage: String, template: String) -> Self {
47 Self {
48 storage,
49 template,
50 additional_properties: Default::default(),
51 }
52 }
53}
54#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
55pub struct PostParams {
56 #[doc = "The storage where the template will be stored"]
57 pub storage: String,
58 #[doc = "The template which will downloaded"]
59 pub template: String,
60 #[serde(
61 flatten,
62 default,
63 skip_serializing_if = "::std::collections::HashMap::is_empty"
64 )]
65 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
66}