use serde::{Deserialize, Serialize}; /*
                                      * Compute Engine API
                                      *
                                      * Creates and runs virtual machines on Google Cloud Platform.
                                      *
                                      * The version of the OpenAPI document: v1
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct ResourcePolicyWeeklyCycleDayOfWeek {
    /// Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
    #[serde(rename = "day", skip_serializing_if = "Option::is_none")]
    pub day: Option<Day>,
    /// [Output only] Duration of the time window, automatically chosen to be smallest possible in the given scenario.
    #[serde(rename = "duration", skip_serializing_if = "Option::is_none")]
    pub duration: Option<String>,
    /// Time within the window to start the operations. It must be in format \"HH:MM\", where HH : [00-23] and MM : [00-00] GMT.
    #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")]
    pub start_time: Option<String>,
}

impl ResourcePolicyWeeklyCycleDayOfWeek {
    pub fn new() -> ResourcePolicyWeeklyCycleDayOfWeek {
        ResourcePolicyWeeklyCycleDayOfWeek {
            day: None,
            duration: None,
            start_time: None,
        }
    }
}

/// Defines a schedule that runs on specific days of the week. Specify one or more days. The following options are available: MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Day {
    #[serde(rename = "FRIDAY")]
    Friday,
    #[serde(rename = "INVALID")]
    Invalid,
    #[serde(rename = "MONDAY")]
    Monday,
    #[serde(rename = "SATURDAY")]
    Saturday,
    #[serde(rename = "SUNDAY")]
    Sunday,
    #[serde(rename = "THURSDAY")]
    Thursday,
    #[serde(rename = "TUESDAY")]
    Tuesday,
    #[serde(rename = "WEDNESDAY")]
    Wednesday,
}

impl Default for Day {
    fn default() -> Day {
        Self::Friday
    }
}
