proxmox_api/generated/cluster/jobs/
schedule_analyze.rs1pub struct ScheduleAnalyzeClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> ScheduleAnalyzeClient<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, "/schedule-analyze"),
13 }
14 }
15}
16impl<T> ScheduleAnalyzeClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Returns a list of future schedule runtimes."]
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(timestamp: u64, utc: String) -> Self {
28 Self {
29 timestamp,
30 utc,
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 = "UNIX timestamp for the run."]
42 pub timestamp: u64,
43 #[doc = "UTC timestamp for the run."]
44 pub utc: 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}
52impl GetParams {
53 pub fn new(schedule: String) -> Self {
54 Self {
55 schedule,
56 iterations: Default::default(),
57 starttime: Default::default(),
58 additional_properties: Default::default(),
59 }
60 }
61}
62#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
63pub struct GetParams {
64 #[serde(
65 serialize_with = "crate::types::serialize_int_optional",
66 deserialize_with = "crate::types::deserialize_int_optional"
67 )]
68 #[serde(skip_serializing_if = "Option::is_none", default)]
69 #[doc = "Number of event-iteration to simulate and return."]
70 pub iterations: Option<u64>,
71 #[doc = "Job schedule. The format is a subset of `systemd` calendar events."]
72 pub schedule: String,
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 = "UNIX timestamp to start the calculation from. Defaults to the current time."]
79 pub starttime: 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}