proxmox_api/generated/nodes/node/
journal.rs

1pub struct JournalClient<T> {
2    client: T,
3    path: String,
4}
5impl<T> JournalClient<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, "/journal"),
13        }
14    }
15}
16impl<T> JournalClient<T>
17where
18    T: crate::client::Client,
19{
20    #[doc = "Read Journal"]
21    pub fn get(&self, params: GetParams) -> Result<Vec<String>, T::Error> {
22        let path = self.path.to_string();
23        self.client.get(&path, &params)
24    }
25}
26#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
27pub struct GetParams {
28    #[serde(skip_serializing_if = "Option::is_none", default)]
29    #[doc = "End before the given Cursor. Conflicts with 'until'"]
30    pub endcursor: Option<String>,
31    #[serde(
32        serialize_with = "crate::types::serialize_int_optional",
33        deserialize_with = "crate::types::deserialize_int_optional"
34    )]
35    #[serde(skip_serializing_if = "Option::is_none", default)]
36    #[doc = "Limit to the last X lines. Conflicts with a range."]
37    pub lastentries: Option<u64>,
38    #[serde(
39        serialize_with = "crate::types::serialize_int_optional",
40        deserialize_with = "crate::types::deserialize_int_optional"
41    )]
42    #[serde(skip_serializing_if = "Option::is_none", default)]
43    #[doc = "Display all log since this UNIX epoch. Conflicts with 'startcursor'."]
44    pub since: Option<u64>,
45    #[serde(skip_serializing_if = "Option::is_none", default)]
46    #[doc = "Start after the given Cursor. Conflicts with 'since'"]
47    pub startcursor: Option<String>,
48    #[serde(
49        serialize_with = "crate::types::serialize_int_optional",
50        deserialize_with = "crate::types::deserialize_int_optional"
51    )]
52    #[serde(skip_serializing_if = "Option::is_none", default)]
53    #[doc = "Display all log until this UNIX epoch. Conflicts with 'endcursor'."]
54    pub until: Option<u64>,
55    #[serde(
56        flatten,
57        default,
58        skip_serializing_if = "::std::collections::HashMap::is_empty"
59    )]
60    pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
61}