/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetEdgeNodeCache200Response {
    #[serde(rename = "cache_size_mb")]
    pub cache_size_mb: i32,
    #[serde(rename = "capacity_mb")]
    pub capacity_mb: i32,
    #[serde(rename = "item_count")]
    pub item_count: i32,
    /// Cache hit rate as a decimal between 0 and 1.
    #[serde(rename = "hit_rate", skip_serializing_if = "Option::is_none")]
    pub hit_rate: Option<f64>,
}

impl GetEdgeNodeCache200Response {
    pub fn new(cache_size_mb: i32, capacity_mb: i32, item_count: i32) -> GetEdgeNodeCache200Response {
        GetEdgeNodeCache200Response {
            cache_size_mb,
            capacity_mb,
            item_count,
            hit_rate: None,
        }
    }
}

