stadar 0.1.6

Rust SDK for the stadar.net esports data API.
/*
 * Stadar Esports Data API
 *
 * Read-only, betting-friendly esports data across all major competitive titles. Flat-tier pricing (no per-game gates), Polar- billed subscriptions (Merchant of Record), 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TeamForm {
    /// Public team id (team_<ulid>), null for TBD slots.
    #[serde(rename = "team_id")]
    pub team_id: String,
    /// Most-recent first, up to 10 entries. `W`, `L`.
    #[serde(rename = "last_n_results")]
    pub last_n_results: Vec<LastNResults>,
    #[serde(rename = "wins_30d")]
    pub wins_30d: i32,
    #[serde(rename = "losses_30d")]
    pub losses_30d: i32,
}

impl TeamForm {
    pub fn new(team_id: String, last_n_results: Vec<LastNResults>, wins_30d: i32, losses_30d: i32) -> TeamForm {
        TeamForm {
            team_id,
            last_n_results,
            wins_30d,
            losses_30d,
        }
    }
}
/// Most-recent first, up to 10 entries. `W`, `L`.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum LastNResults {
    #[serde(rename = "W")]
    W,
    #[serde(rename = "L")]
    L,
}

impl Default for LastNResults {
    fn default() -> LastNResults {
        Self::W
    }
}