/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// DbPoolStats : Database connection pool statistics.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DbPoolStats {
    #[serde(rename = "active_connections")]
    pub active_connections: i32,
    #[serde(rename = "idle_connections")]
    pub idle_connections: i32,
    #[serde(rename = "max_connections")]
    pub max_connections: i32,
    #[serde(rename = "size")]
    pub size: i32,
}

impl DbPoolStats {
    /// Database connection pool statistics.
    pub fn new(active_connections: i32, idle_connections: i32, max_connections: i32, size: i32) -> DbPoolStats {
        DbPoolStats {
            active_connections,
            idle_connections,
            max_connections,
            size,
        }
    }
}

