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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AccountUsageRps200ResponseData {
    /// Requests counted across the smoothing window (sum of the current and previous 1-second buckets). 
    #[serde(rename = "requests_in_window", skip_serializing_if = "Option::is_none")]
    pub requests_in_window: Option<i32>,
    /// Per-second cap enforced by the rate limiter. 0 means unlimited (enterprise tier). 
    #[serde(rename = "rps_cap", skip_serializing_if = "Option::is_none")]
    pub rps_cap: Option<i32>,
    /// Smoothing-window width in seconds (currently 2).
    #[serde(rename = "window_seconds", skip_serializing_if = "Option::is_none")]
    pub window_seconds: Option<i32>,
    #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
    pub tier: Option<Tier>,
    /// True when rps_cap=0 (enterprise tier).
    #[serde(rename = "unlimited", skip_serializing_if = "Option::is_none")]
    pub unlimited: Option<bool>,
}

impl AccountUsageRps200ResponseData {
    pub fn new() -> AccountUsageRps200ResponseData {
        AccountUsageRps200ResponseData {
            requests_in_window: None,
            rps_cap: None,
            window_seconds: None,
            tier: None,
            unlimited: None,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Tier {
    #[serde(rename = "free")]
    Free,
    #[serde(rename = "hobbyist")]
    Hobbyist,
    #[serde(rename = "pro")]
    Pro,
    #[serde(rename = "scale")]
    Scale,
    #[serde(rename = "enterprise")]
    Enterprise,
}

impl Default for Tier {
    fn default() -> Tier {
        Self::Free
    }
}