proxmox_api/generated/nodes/node/
syslog.rs1pub struct SyslogClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> SyslogClient<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, "/syslog"),
13 }
14 }
15}
16impl<T> SyslogClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Read system 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, ¶ms)
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(skip_serializing_if = "Option::is_none", default)]
61 #[doc = "Service ID"]
62 pub service: Option<String>,
63 #[serde(skip_serializing_if = "Option::is_none", default)]
64 #[doc = "Display all log since this date-time string."]
65 pub since: Option<String>,
66 #[serde(
67 serialize_with = "crate::types::serialize_int_optional",
68 deserialize_with = "crate::types::deserialize_int_optional"
69 )]
70 #[serde(skip_serializing_if = "Option::is_none", default)]
71 pub start: Option<u64>,
72 #[serde(skip_serializing_if = "Option::is_none", default)]
73 #[doc = "Display all log until this date-time string."]
74 pub until: Option<String>,
75 #[serde(
76 flatten,
77 default,
78 skip_serializing_if = "::std::collections::HashMap::is_empty"
79 )]
80 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
81}