/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct XApiPricingTiersInner {
    /// Historical bucket key used in `xApiCalls` aggregation.
    #[serde(rename = "tier", skip_serializing_if = "Option::is_none")]
    pub tier: Option<Tier>,
    #[serde(rename = "pricePerCallUsd", skip_serializing_if = "Option::is_none")]
    pub price_per_call_usd: Option<f64>,
    #[serde(rename = "operationCount", skip_serializing_if = "Option::is_none")]
    pub operation_count: Option<i32>,
}

impl XApiPricingTiersInner {
    pub fn new() -> XApiPricingTiersInner {
        XApiPricingTiersInner {
            tier: None,
            price_per_call_usd: None,
            operation_count: None,
        }
    }
}
/// Historical bucket key used in `xApiCalls` aggregation.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Tier {
    #[serde(rename = "x_api_005")]
    XApi005,
    #[serde(rename = "x_api_010")]
    XApi010,
    #[serde(rename = "x_api_015")]
    XApi015,
}

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