proxmox_api/generated/cluster/
metrics.rs1pub mod server;
2pub struct MetricsClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> MetricsClient<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, "/metrics"),
14 }
15 }
16}
17impl<T> MetricsClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "Metrics index."]
22 pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
23 let path = self.path.to_string();
24 self.client.get(&path, &())
25 }
26}
27#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
28pub struct GetOutputItems {
29 #[serde(
30 flatten,
31 default,
32 skip_serializing_if = "::std::collections::HashMap::is_empty"
33 )]
34 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
35}
36impl<T> MetricsClient<T>
37where
38 T: crate::client::Client,
39{
40 pub fn server(&self) -> server::ServerClient<T> {
41 server::ServerClient::<T>::new(self.client.clone(), &self.path)
42 }
43}