harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * 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
    }
}