proxmox_api/generated/nodes/node/tasks/upid/
log.rs1pub 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 task 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_bool_optional",
56 deserialize_with = "crate::types::deserialize_bool_optional"
57 )]
58 #[serde(skip_serializing_if = "Option::is_none", default)]
59 #[doc = "Whether the tasklog file should be downloaded. This parameter can't be used in conjunction with other parameters"]
60 pub download: Option<bool>,
61 #[serde(
62 serialize_with = "crate::types::serialize_int_optional",
63 deserialize_with = "crate::types::deserialize_int_optional"
64 )]
65 #[serde(skip_serializing_if = "Option::is_none", default)]
66 #[doc = "The amount of lines to read from the tasklog."]
67 pub limit: Option<u64>,
68 #[serde(
69 serialize_with = "crate::types::serialize_int_optional",
70 deserialize_with = "crate::types::deserialize_int_optional"
71 )]
72 #[serde(skip_serializing_if = "Option::is_none", default)]
73 #[doc = "Start at this line when reading the tasklog"]
74 pub start: Option<u64>,
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}