1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* Harbor API
*
* These APIs provide services for manipulating Harbor project.
*
* The version of the OpenAPI document: 2.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ScheduleObj {
/// The schedule type. The valid values are 'Hourly', 'Daily', 'Weekly', 'Custom', 'Manual', 'None' and 'Schedule'. 'Manual' means to trigger it right away, 'Schedule' means to trigger it by a specified cron schedule and 'None' means to cancel the schedule.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<Type>,
/// A cron expression, a time-based job scheduler.
#[serde(rename = "cron", skip_serializing_if = "Option::is_none")]
pub cron: Option<String>,
/// The next time to schedule to run the job.
#[serde(rename = "next_scheduled_time", skip_serializing_if = "Option::is_none")]
pub next_scheduled_time: Option<String>,
}
impl ScheduleObj {
pub fn new() -> ScheduleObj {
ScheduleObj {
r#type: None,
cron: None,
next_scheduled_time: None,
}
}
}
/// The schedule type. The valid values are 'Hourly', 'Daily', 'Weekly', 'Custom', 'Manual', 'None' and 'Schedule'. 'Manual' means to trigger it right away, 'Schedule' means to trigger it by a specified cron schedule and 'None' means to cancel the schedule.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "Hourly")]
Hourly,
#[serde(rename = "Daily")]
Daily,
#[serde(rename = "Weekly")]
Weekly,
#[serde(rename = "Custom")]
Custom,
#[serde(rename = "Manual")]
Manual,
#[serde(rename = "None")]
None,
#[serde(rename = "Schedule")]
Schedule,
}
impl Default for Type {
fn default() -> Type {
Self::Hourly
}
}