proxmox_api/generated/nodes/node/ceph/
log.rs1#[derive(Debug, Clone)]
2pub struct LogClient<T> {
3 client: T,
4 path: String,
5}
6impl<T> LogClient<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, "/log"),
14 }
15 }
16}
17impl<T> LogClient<T>
18where
19 T: crate::client::Client,
20{
21 #[doc = "Read ceph log"]
22 #[doc = ""]
23 #[doc = "Permission check: perm(\"/nodes/{node}\", [\"Sys.Syslog\"])"]
24 pub async fn get(&self, params: GetParams) -> Result<Vec<GetOutputItems>, T::Error> {
25 let path = self.path.to_string();
26 let optional_vec: Option<Vec<GetOutputItems>> = self.client.get(&path, ¶ms).await?;
27 Ok(optional_vec.unwrap_or_default())
28 }
29}
30impl GetOutputItems {
31 pub fn new(n: i64, t: String) -> Self {
32 Self {
33 n,
34 t,
35 additional_properties: ::std::default::Default::default(),
36 }
37 }
38}
39#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
40pub struct GetOutputItems {
41 #[serde(
42 serialize_with = "crate::types::serialize_int",
43 deserialize_with = "crate::types::deserialize_int"
44 )]
45 #[doc = "Line number"]
46 #[doc = ""]
47 pub n: i64,
48 #[doc = "Line text"]
49 #[doc = ""]
50 pub t: String,
51 #[serde(
52 flatten,
53 default,
54 skip_serializing_if = "::std::collections::HashMap::is_empty"
55 )]
56 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
57}
58#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
59pub struct GetParams {
60 #[serde(
61 serialize_with = "crate::types::serialize_unsigned_int_optional",
62 deserialize_with = "crate::types::deserialize_unsigned_int_optional"
63 )]
64 #[serde(skip_serializing_if = "Option::is_none", default)]
65 pub limit: Option<u64>,
66 #[serde(
67 serialize_with = "crate::types::serialize_unsigned_int_optional",
68 deserialize_with = "crate::types::deserialize_unsigned_int_optional"
69 )]
70 #[serde(skip_serializing_if = "Option::is_none", default)]
71 pub start: Option<u64>,
72 #[serde(
73 flatten,
74 default,
75 skip_serializing_if = "::std::collections::HashMap::is_empty"
76 )]
77 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
78}