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

/// CountryResponse : Representation of a country as defined in ISO 3166-1
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CountryResponse {
    /// ISO 3166-1 country code
    #[serde(rename = "isoCode")]
    pub iso_code: String,
    /// Localized country names
    #[serde(rename = "name")]
    pub name: Vec<models::LocalizedText>,
    /// Official ISO-639-1 language codes
    #[serde(rename = "officialLanguages")]
    pub official_languages: Vec<String>,
}

impl CountryResponse {
    /// Representation of a country as defined in ISO 3166-1
    pub fn new(iso_code: String, name: Vec<models::LocalizedText>, official_languages: Vec<String>) -> CountryResponse {
        CountryResponse {
            iso_code,
            name,
            official_languages,
        }
    }
}