proxmox_api/generated/cluster/sdn/
fabrics.rs1pub mod all;
2pub mod fabric;
3pub mod node;
4#[derive(Debug, Clone)]
5pub struct FabricsClient<T> {
6 client: T,
7 path: String,
8}
9impl<T> FabricsClient<T>
10where
11 T: crate::client::Client,
12{
13 pub fn new(client: T, parent_path: &str) -> Self {
14 Self {
15 client,
16 path: format!("{}{}", parent_path, "/fabrics"),
17 }
18 }
19}
20impl<T> FabricsClient<T>
21where
22 T: crate::client::Client,
23{
24 #[doc = "SDN Fabrics Index"]
25 #[doc = ""]
26 #[doc = "Permission check: perm(\"/sdn/fabrics\", [\"SDN.Audit\"])"]
27 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
28 let path = self.path.to_string();
29 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
30 Ok(optional_vec.unwrap_or_default())
31 }
32}
33impl GetOutputItems {
34 pub fn new(subdir: String) -> Self {
35 Self {
36 subdir,
37 additional_properties: ::std::default::Default::default(),
38 }
39 }
40}
41#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
42pub struct GetOutputItems {
43 pub subdir: String,
44 #[serde(
45 flatten,
46 default,
47 skip_serializing_if = "::std::collections::HashMap::is_empty"
48 )]
49 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
50}
51impl<T> FabricsClient<T>
52where
53 T: crate::client::Client,
54{
55 pub fn fabric(&self) -> fabric::FabricClient<T> {
56 fabric::FabricClient::<T>::new(self.client.clone(), &self.path)
57 }
58}
59impl<T> FabricsClient<T>
60where
61 T: crate::client::Client,
62{
63 pub fn node(&self) -> node::NodeClient<T> {
64 node::NodeClient::<T>::new(self.client.clone(), &self.path)
65 }
66}
67impl<T> FabricsClient<T>
68where
69 T: crate::client::Client,
70{
71 pub fn all(&self) -> all::AllClient<T> {
72 all::AllClient::<T>::new(self.client.clone(), &self.path)
73 }
74}