Skip to main content

proxmox_api/generated/nodes/node/
netstat.rs

1#[derive(Debug, Clone)]
2pub struct NetstatClient<T> {
3    client: T,
4    path: String,
5}
6impl<T> NetstatClient<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, "/netstat"),
14        }
15    }
16}
17impl<T> NetstatClient<T>
18where
19    T: crate::client::Client,
20{
21    #[doc = "Read tap/vm network device interface counters"]
22    #[doc = ""]
23    #[doc = "Permission check: perm(\"/nodes/{node}\", [\"Sys.Audit\"])"]
24    pub async fn get(&self) -> Result<Vec<GetOutputItems>, T::Error> {
25        let path = self.path.to_string();
26        let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, &()).await?;
27        Ok(optional_vec.unwrap_or_default())
28    }
29}
30#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
31pub struct GetOutputItems {
32    #[serde(
33        flatten,
34        default,
35        skip_serializing_if = "::std::collections::HashMap::is_empty"
36    )]
37    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
38}