proxmox_api/generated/nodes/node/sdn/vnets/
vnet.rs1pub mod mac_vrf;
2#[derive(Debug, Clone)]
3pub struct VnetClient<T> {
4 client: T,
5 path: String,
6}
7impl<T> VnetClient<T>
8where
9 T: crate::client::Client,
10{
11 pub fn new(client: T, parent_path: &str, vnet: &str) -> Self {
12 Self {
13 client,
14 path: format!("{}/{}", parent_path, vnet),
15 }
16 }
17}
18impl<T> VnetClient<T>
19where
20 T: crate::client::Client,
21{
22 #[doc = "Require 'SDN.Audit' permissions on '/sdn/zones/\\<zone\\>/\\<vnet\\>'"]
23 pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
24 let path = self.path.to_string();
25 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
26 Ok(optional_vec.unwrap_or_default())
27 }
28}
29impl GetOutputItems {
30 pub fn new(subdir: String) -> Self {
31 Self {
32 subdir,
33 additional_properties: ::std::default::Default::default(),
34 }
35 }
36}
37#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
38pub struct GetOutputItems {
39 pub subdir: String,
40 #[serde(
41 flatten,
42 default,
43 skip_serializing_if = "::std::collections::HashMap::is_empty"
44 )]
45 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
46}
47impl<T> VnetClient<T>
48where
49 T: crate::client::Client,
50{
51 pub fn mac_vrf(&self) -> mac_vrf::MacVrfClient<T> {
52 mac_vrf::MacVrfClient::<T>::new(self.client.clone(), &self.path)
53 }
54}