proxmox_api/generated/nodes/node/firewall/
log.rs

1pub struct LogClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> LogClient<T>
6where
7    T: crate::client::Client,
8{
9    pub fn new(client: T, parent_path: &str) -> Self {
10        Self {
11            client,
12            path: format!("{}{}", parent_path, "/log"),
13        }
14    }
15}
16impl<T> LogClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Read firewall log"]
21    pub fn get(&self, params: GetParams) -> Result<Vec<GetOutputItems>, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &params)
24    }
25}
26impl GetOutputItems {
27    pub fn new(n: u64, t: String) -> Self {
28        Self {
29            n,
30            t,
31            additional_properties: Default::default(),
32        }
33    }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct GetOutputItems {
37    #[serde(
38        serialize_with = "crate::types::serialize_int",
39        deserialize_with = "crate::types::deserialize_int"
40    )]
41    #[doc = "Line number"]
42    pub n: u64,
43    #[doc = "Line text"]
44    pub t: String,
45    #[serde(
46        flatten,
47        default,
48        skip_serializing_if = "::std::collections::HashMap::is_empty"
49    )]
50    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
51}
52#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
53pub struct GetParams {
54    #[serde(
55        serialize_with = "crate::types::serialize_int_optional",
56        deserialize_with = "crate::types::deserialize_int_optional"
57    )]
58    #[serde(skip_serializing_if = "Option::is_none", default)]
59    pub limit: Option<u64>,
60    #[serde(
61        serialize_with = "crate::types::serialize_int_optional",
62        deserialize_with = "crate::types::deserialize_int_optional"
63    )]
64    #[serde(skip_serializing_if = "Option::is_none", default)]
65    #[doc = "Display log since this UNIX epoch."]
66    pub since: Option<u64>,
67    #[serde(
68        serialize_with = "crate::types::serialize_int_optional",
69        deserialize_with = "crate::types::deserialize_int_optional"
70    )]
71    #[serde(skip_serializing_if = "Option::is_none", default)]
72    pub start: Option<u64>,
73    #[serde(
74        serialize_with = "crate::types::serialize_int_optional",
75        deserialize_with = "crate::types::deserialize_int_optional"
76    )]
77    #[serde(skip_serializing_if = "Option::is_none", default)]
78    #[doc = "Display log until this UNIX epoch."]
79    pub until: Option<u64>,
80    #[serde(
81        flatten,
82        default,
83        skip_serializing_if = "::std::collections::HashMap::is_empty"
84    )]
85    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
86}