stadar 0.1.25

Rust SDK for the stadar.net esports data API.
/*
 * Stadar Esports Data API
 *
 * Read-only esports data across all major competitive titles. Flat-tier pricing (no per-game gates), monthly subscriptions, sandbox keys for evaluation. See https://stadar.net for tier pricing. All endpoints under `/v1/...`. The version in `info.version` matches the URL prefix; non-breaking field additions ship in `/v1`, breaking changes get a `/v2`. We commit to 24 months of `/v1` support after `/v2` ships. Times are UTC end-to-end (RFC 3339). Localization is the client's problem. Cursors are opaque base64 strings; treat them as such. 
 *
 * The version of the OpenAPI document: v1
 * Contact: api@stadar.net
 * Generated by: https://openapi-generator.tech
 */

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

use serde_repr::{Serialize_repr,Deserialize_repr};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TeamHeadToHeadMatch {
    #[serde(rename = "match_id")]
    pub match_id: String,
    #[serde(rename = "game")]
    pub game: String,
    #[serde(rename = "scheduled_at")]
    pub scheduled_at: chrono::DateTime<chrono::FixedOffset>,
    #[serde(rename = "format")]
    pub format: String,
    #[serde(rename = "score_a")]
    pub score_a: i32,
    #[serde(rename = "score_b")]
    pub score_b: i32,
    #[serde(rename = "winner_side")]
    pub winner_side: WinnerSide,
}

impl TeamHeadToHeadMatch {
    pub fn new(match_id: String, game: String, scheduled_at: chrono::DateTime<chrono::FixedOffset>, format: String, score_a: i32, score_b: i32, winner_side: WinnerSide) -> TeamHeadToHeadMatch {
        TeamHeadToHeadMatch {
            match_id,
            game,
            scheduled_at,
            format,
            score_a,
            score_b,
            winner_side,
        }
    }
}
/// 
#[repr(i64)]
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize_repr, Deserialize_repr)]
pub enum WinnerSide {
    Variant0 = 0,
    Variant1 = 1,
}

impl std::fmt::Display for WinnerSide {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        write!(f, "{}", match self {
            Self::Variant0 => "0",
            Self::Variant1 => "1",
        })
    }
}

impl Default for WinnerSide {
    fn default() -> WinnerSide {
        Self::Variant0
    }
}