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};

/// StatisticsResponse : Statistical data of the holidays database
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StatisticsResponse {
    /// The youngest holiday start date in the database
    #[serde(rename = "youngestStartDate")]
    pub youngest_start_date: chrono::NaiveDate,
    /// The oldest holiday start date in the database
    #[serde(rename = "oldestStartDate")]
    pub oldest_start_date: chrono::NaiveDate,
}

impl StatisticsResponse {
    /// Statistical data of the holidays database
    pub fn new(youngest_start_date: chrono::NaiveDate, oldest_start_date: chrono::NaiveDate) -> StatisticsResponse {
        StatisticsResponse {
            youngest_start_date,
            oldest_start_date,
        }
    }
}