proxmox_api/generated/nodes/node/storage/
storage.rs1pub mod content;
2pub mod download_url;
3pub mod file_restore;
4pub mod import_metadata;
5pub mod prunebackups;
6pub mod rrd;
7pub mod rrddata;
8pub mod status;
9pub mod upload;
10pub struct StorageClient<T> {
11 client: T,
12 path: String,
13}
14impl<T> StorageClient<T>
15where
16 T: crate::client::Client,
17{
18 pub fn new(client: T, parent_path: &str, storage: &str) -> Self {
19 Self {
20 client,
21 path: format!("{}/{}", parent_path, storage),
22 }
23 }
24}
25impl<T> StorageClient<T>
26where
27 T: crate::client::Client,
28{
29 #[doc = ""]
30 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
31 let path = self.path.to_string();
32 self.client.get(&path, &())
33 }
34}
35impl GetOutputItems {
36 pub fn new(subdir: String) -> Self {
37 Self {
38 subdir,
39 additional_properties: Default::default(),
40 }
41 }
42}
43#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
44pub struct GetOutputItems {
45 pub subdir: String,
46 #[serde(
47 flatten,
48 default,
49 skip_serializing_if = "::std::collections::HashMap::is_empty"
50 )]
51 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
52}
53impl<T> StorageClient<T>
54where
55 T: crate::client::Client,
56{
57 pub fn prunebackups(&self) -> prunebackups::PrunebackupsClient<T> {
58 prunebackups::PrunebackupsClient::<T>::new(self.client.clone(), &self.path)
59 }
60}
61impl<T> StorageClient<T>
62where
63 T: crate::client::Client,
64{
65 pub fn content(&self) -> content::ContentClient<T> {
66 content::ContentClient::<T>::new(self.client.clone(), &self.path)
67 }
68}
69impl<T> StorageClient<T>
70where
71 T: crate::client::Client,
72{
73 pub fn file_restore(&self) -> file_restore::FileRestoreClient<T> {
74 file_restore::FileRestoreClient::<T>::new(self.client.clone(), &self.path)
75 }
76}
77impl<T> StorageClient<T>
78where
79 T: crate::client::Client,
80{
81 pub fn status(&self) -> status::StatusClient<T> {
82 status::StatusClient::<T>::new(self.client.clone(), &self.path)
83 }
84}
85impl<T> StorageClient<T>
86where
87 T: crate::client::Client,
88{
89 pub fn rrd(&self) -> rrd::RrdClient<T> {
90 rrd::RrdClient::<T>::new(self.client.clone(), &self.path)
91 }
92}
93impl<T> StorageClient<T>
94where
95 T: crate::client::Client,
96{
97 pub fn rrddata(&self) -> rrddata::RrddataClient<T> {
98 rrddata::RrddataClient::<T>::new(self.client.clone(), &self.path)
99 }
100}
101impl<T> StorageClient<T>
102where
103 T: crate::client::Client,
104{
105 pub fn upload(&self) -> upload::UploadClient<T> {
106 upload::UploadClient::<T>::new(self.client.clone(), &self.path)
107 }
108}
109impl<T> StorageClient<T>
110where
111 T: crate::client::Client,
112{
113 pub fn download_url(&self) -> download_url::DownloadUrlClient<T> {
114 download_url::DownloadUrlClient::<T>::new(self.client.clone(), &self.path)
115 }
116}
117impl<T> StorageClient<T>
118where
119 T: crate::client::Client,
120{
121 pub fn import_metadata(&self) -> import_metadata::ImportMetadataClient<T> {
122 import_metadata::ImportMetadataClient::<T>::new(self.client.clone(), &self.path)
123 }
124}