proxmox_api/generated/
cluster.rs1pub mod acme;
2pub mod backup;
3pub mod backup_info;
4pub mod bulk_action;
5pub mod ceph;
6pub mod config;
7pub mod firewall;
8pub mod ha;
9pub mod jobs;
10pub mod log;
11pub mod mapping;
12pub mod metrics;
13pub mod nextid;
14pub mod notifications;
15pub mod options;
16pub mod replication;
17pub mod resources;
18pub mod sdn;
19pub mod status;
20pub mod tasks;
21#[derive(Debug, Clone)]
22pub struct ClusterClient<T> {
23 client: T,
24 path: String,
25}
26impl<T> ClusterClient<T>
27where
28 T: crate::client::Client,
29{
30 pub fn new(client: T) -> Self {
31 Self {
32 client,
33 path: "/cluster".to_string(),
34 }
35 }
36}
37impl<T> ClusterClient<T>
38where
39 T: crate::client::Client,
40{
41 #[doc = "Cluster index."]
42 #[doc = ""]
43 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
44 let path = self.path.to_string();
45 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
46 Ok(optional_vec.unwrap_or_default())
47 }
48}
49#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
50pub struct GetOutputItems {
51 #[serde(
52 flatten,
53 default,
54 skip_serializing_if = "::std::collections::HashMap::is_empty"
55 )]
56 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
57}
58impl<T> ClusterClient<T>
59where
60 T: crate::client::Client,
61{
62 pub fn replication(&self) -> replication::ReplicationClient<T> {
63 replication::ReplicationClient::<T>::new(self.client.clone(), &self.path)
64 }
65}
66impl<T> ClusterClient<T>
67where
68 T: crate::client::Client,
69{
70 pub fn metrics(&self) -> metrics::MetricsClient<T> {
71 metrics::MetricsClient::<T>::new(self.client.clone(), &self.path)
72 }
73}
74impl<T> ClusterClient<T>
75where
76 T: crate::client::Client,
77{
78 pub fn notifications(&self) -> notifications::NotificationsClient<T> {
79 notifications::NotificationsClient::<T>::new(self.client.clone(), &self.path)
80 }
81}
82impl<T> ClusterClient<T>
83where
84 T: crate::client::Client,
85{
86 pub fn config(&self) -> config::ConfigClient<T> {
87 config::ConfigClient::<T>::new(self.client.clone(), &self.path)
88 }
89}
90impl<T> ClusterClient<T>
91where
92 T: crate::client::Client,
93{
94 pub fn firewall(&self) -> firewall::FirewallClient<T> {
95 firewall::FirewallClient::<T>::new(self.client.clone(), &self.path)
96 }
97}
98impl<T> ClusterClient<T>
99where
100 T: crate::client::Client,
101{
102 pub fn backup(&self) -> backup::BackupClient<T> {
103 backup::BackupClient::<T>::new(self.client.clone(), &self.path)
104 }
105}
106impl<T> ClusterClient<T>
107where
108 T: crate::client::Client,
109{
110 pub fn backup_info(&self) -> backup_info::BackupInfoClient<T> {
111 backup_info::BackupInfoClient::<T>::new(self.client.clone(), &self.path)
112 }
113}
114impl<T> ClusterClient<T>
115where
116 T: crate::client::Client,
117{
118 pub fn ha(&self) -> ha::HaClient<T> {
119 ha::HaClient::<T>::new(self.client.clone(), &self.path)
120 }
121}
122impl<T> ClusterClient<T>
123where
124 T: crate::client::Client,
125{
126 pub fn acme(&self) -> acme::AcmeClient<T> {
127 acme::AcmeClient::<T>::new(self.client.clone(), &self.path)
128 }
129}
130impl<T> ClusterClient<T>
131where
132 T: crate::client::Client,
133{
134 pub fn ceph(&self) -> ceph::CephClient<T> {
135 ceph::CephClient::<T>::new(self.client.clone(), &self.path)
136 }
137}
138impl<T> ClusterClient<T>
139where
140 T: crate::client::Client,
141{
142 pub fn jobs(&self) -> jobs::JobsClient<T> {
143 jobs::JobsClient::<T>::new(self.client.clone(), &self.path)
144 }
145}
146impl<T> ClusterClient<T>
147where
148 T: crate::client::Client,
149{
150 pub fn mapping(&self) -> mapping::MappingClient<T> {
151 mapping::MappingClient::<T>::new(self.client.clone(), &self.path)
152 }
153}
154impl<T> ClusterClient<T>
155where
156 T: crate::client::Client,
157{
158 pub fn bulk_action(&self) -> bulk_action::BulkActionClient<T> {
159 bulk_action::BulkActionClient::<T>::new(self.client.clone(), &self.path)
160 }
161}
162impl<T> ClusterClient<T>
163where
164 T: crate::client::Client,
165{
166 pub fn sdn(&self) -> sdn::SdnClient<T> {
167 sdn::SdnClient::<T>::new(self.client.clone(), &self.path)
168 }
169}
170impl<T> ClusterClient<T>
171where
172 T: crate::client::Client,
173{
174 pub fn log(&self) -> log::LogClient<T> {
175 log::LogClient::<T>::new(self.client.clone(), &self.path)
176 }
177}
178impl<T> ClusterClient<T>
179where
180 T: crate::client::Client,
181{
182 pub fn resources(&self) -> resources::ResourcesClient<T> {
183 resources::ResourcesClient::<T>::new(self.client.clone(), &self.path)
184 }
185}
186impl<T> ClusterClient<T>
187where
188 T: crate::client::Client,
189{
190 pub fn tasks(&self) -> tasks::TasksClient<T> {
191 tasks::TasksClient::<T>::new(self.client.clone(), &self.path)
192 }
193}
194impl<T> ClusterClient<T>
195where
196 T: crate::client::Client,
197{
198 pub fn options(&self) -> options::OptionsClient<T> {
199 options::OptionsClient::<T>::new(self.client.clone(), &self.path)
200 }
201}
202impl<T> ClusterClient<T>
203where
204 T: crate::client::Client,
205{
206 pub fn status(&self) -> status::StatusClient<T> {
207 status::StatusClient::<T>::new(self.client.clone(), &self.path)
208 }
209}
210impl<T> ClusterClient<T>
211where
212 T: crate::client::Client,
213{
214 pub fn nextid(&self) -> nextid::NextidClient<T> {
215 nextid::NextidClient::<T>::new(self.client.clone(), &self.path)
216 }
217}