redfish-codegen 0.3.1

An unopinionated translation of the Redfish specification into Rust.
Documentation
// Generated by redfish-codegen. Do not modify.

use crate::models;

/// Schedule a series of occurrences.
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
#[derive(derivative::Derivative)]
#[derivative(Default)]
pub struct Schedule {
    /// Days of the month when scheduled occurrences are enabled.  `0` indicates that every day of the month is enabled.
    #[serde(rename = "EnabledDaysOfMonth")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled_days_of_month: Option<Vec<i64>>,
    /// Days of the week when scheduled occurrences are enabled, for enabled days of the month and months of the year.  If not present, all days of the week are enabled.
    #[serde(rename = "EnabledDaysOfWeek")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled_days_of_week: Option<Vec<models::schedule::v1_0_2::DayOfWeek>>,
    /// The months of the year when scheduled occurrences are enabled.  If not present, all months of the year are enabled.
    #[serde(rename = "EnabledMonthsOfYear")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub enabled_months_of_year: Option<Vec<models::schedule::v1_0_2::MonthOfYear>>,
    /// The date and time when the initial occurrence is scheduled to occur.
    #[serde(rename = "InitialStartTime")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub initial_start_time: Option<String>,
    /// The time after provisioning when the schedule as a whole expires.
    #[serde(rename = "Lifetime")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub lifetime: Option<String>,
    /// The maximum number of scheduled occurrences.
    #[serde(rename = "MaxOccurrences")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub max_occurrences: Option<i64>,
    /// The schedule name.
    #[serde(rename = "Name")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The duration between consecutive occurrences.
    #[serde(rename = "RecurrenceInterval")]
    #[serde(default, skip_serializing_if = "Option::is_none")]
    pub recurrence_interval: Option<String>,
}

impl crate::Metadata<'static> for Schedule {
    const JSON_SCHEMA: &'static str = "Schedule.v1_0_2.json";
}