/*
 * codex-backend
 *
 * codex-backend
 *
 * The version of the OpenAPI document: 0.0.1
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::Deserialize;
use serde::Serialize;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AdditionalRateLimitDetails {
    #[serde(rename = "limit_name")]
    pub limit_name: String,
    #[serde(rename = "metered_feature")]
    pub metered_feature: String,
    #[serde(
        rename = "rate_limit",
        default,
        with = "::serde_with::rust::double_option",
        skip_serializing_if = "Option::is_none"
    )]
    pub rate_limit: Option<Option<Box<models::RateLimitStatusDetails>>>,
}

impl AdditionalRateLimitDetails {
    pub fn new(limit_name: String, metered_feature: String) -> AdditionalRateLimitDetails {
        AdditionalRateLimitDetails {
            limit_name,
            metered_feature,
            rate_limit: None,
        }
    }
}
