siapla-open-holidays-api 0.2.1

A simple agile planning tool
Documentation
/*
 * OpenHolidays API v1
 *
 * Open Data API for public and school holidays
 *
 * The version of the OpenAPI document: v1
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// HolidayType : Type of holiday
/// Type of holiday
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum HolidayType {
    #[serde(rename = "Public")]
    Public,
    #[serde(rename = "Bank")]
    Bank,
    #[serde(rename = "Optional")]
    Optional,
    #[serde(rename = "School")]
    School,
    #[serde(rename = "BackToSchool")]
    BackToSchool,
    #[serde(rename = "EndOfLessons")]
    EndOfLessons,

}

impl std::fmt::Display for HolidayType {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::Public => write!(f, "Public"),
            Self::Bank => write!(f, "Bank"),
            Self::Optional => write!(f, "Optional"),
            Self::School => write!(f, "School"),
            Self::BackToSchool => write!(f, "BackToSchool"),
            Self::EndOfLessons => write!(f, "EndOfLessons"),
        }
    }
}

impl Default for HolidayType {
    fn default() -> HolidayType {
        Self::Public
    }
}