proxmox_api/generated/cluster/
notifications.rs

1pub mod endpoints;
2pub mod matchers;
3pub mod targets;
4pub struct NotificationsClient<T> {
5    client: T,
6    path: String,
7}
8impl<T> NotificationsClient<T>
9where
10    T: crate::client::Client,
11{
12    pub fn new(client: T, parent_path: &str) -> Self {
13        Self {
14            client,
15            path: format!("{}{}", parent_path, "/notifications"),
16        }
17    }
18}
19impl<T> NotificationsClient<T>
20where
21    T: crate::client::Client,
22{
23    #[doc = "Index for notification-related API endpoints."]
24    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
25        let path = self.path.to_string();
26        self.client.get(&path, &())
27    }
28}
29#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
30pub struct GetOutputItems {
31    #[serde(
32        flatten,
33        default,
34        skip_serializing_if = "::std::collections::HashMap::is_empty"
35    )]
36    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
37}
38impl<T> NotificationsClient<T>
39where
40    T: crate::client::Client,
41{
42    pub fn endpoints(&self) -> endpoints::EndpointsClient<T> {
43        endpoints::EndpointsClient::<T>::new(self.client.clone(), &self.path)
44    }
45}
46impl<T> NotificationsClient<T>
47where
48    T: crate::client::Client,
49{
50    pub fn targets(&self) -> targets::TargetsClient<T> {
51        targets::TargetsClient::<T>::new(self.client.clone(), &self.path)
52    }
53}
54impl<T> NotificationsClient<T>
55where
56    T: crate::client::Client,
57{
58    pub fn matchers(&self) -> matchers::MatchersClient<T> {
59        matchers::MatchersClient::<T>::new(self.client.clone(), &self.path)
60    }
61}