proxmox_api/generated/cluster/
sdn.rs

1pub mod controllers;
2pub mod dns;
3pub mod ipams;
4pub mod vnets;
5pub mod zones;
6pub struct SdnClient<T> {
7    client: T,
8    path: String,
9}
10impl<T> SdnClient<T>
11where
12    T: crate::client::Client,
13{
14    pub fn new(client: T, parent_path: &str) -> Self {
15        Self {
16            client,
17            path: format!("{}{}", parent_path, "/sdn"),
18        }
19    }
20}
21impl<T> SdnClient<T>
22where
23    T: crate::client::Client,
24{
25    #[doc = "Directory index."]
26    pub fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
27        let path = self.path.to_string();
28        self.client.get(&path, &())
29    }
30}
31impl<T> SdnClient<T>
32where
33    T: crate::client::Client,
34{
35    #[doc = "Apply sdn controller changes && reload."]
36    pub fn put(&self) -> Result<String, T::Error> {
37        let path = self.path.to_string();
38        self.client.put(&path, &())
39    }
40}
41impl GetOutputItems {
42    pub fn new(id: String) -> Self {
43        Self {
44            id,
45            additional_properties: Default::default(),
46        }
47    }
48}
49#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
50pub struct GetOutputItems {
51    pub id: String,
52    #[serde(
53        flatten,
54        default,
55        skip_serializing_if = "::std::collections::HashMap::is_empty"
56    )]
57    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
58}
59impl<T> SdnClient<T>
60where
61    T: crate::client::Client,
62{
63    pub fn vnets(&self) -> vnets::VnetsClient<T> {
64        vnets::VnetsClient::<T>::new(self.client.clone(), &self.path)
65    }
66}
67impl<T> SdnClient<T>
68where
69    T: crate::client::Client,
70{
71    pub fn zones(&self) -> zones::ZonesClient<T> {
72        zones::ZonesClient::<T>::new(self.client.clone(), &self.path)
73    }
74}
75impl<T> SdnClient<T>
76where
77    T: crate::client::Client,
78{
79    pub fn controllers(&self) -> controllers::ControllersClient<T> {
80        controllers::ControllersClient::<T>::new(self.client.clone(), &self.path)
81    }
82}
83impl<T> SdnClient<T>
84where
85    T: crate::client::Client,
86{
87    pub fn ipams(&self) -> ipams::IpamsClient<T> {
88        ipams::IpamsClient::<T>::new(self.client.clone(), &self.path)
89    }
90}
91impl<T> SdnClient<T>
92where
93    T: crate::client::Client,
94{
95    pub fn dns(&self) -> dns::DnsClient<T> {
96        dns::DnsClient::<T>::new(self.client.clone(), &self.path)
97    }
98}