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

/// StorageSnapshot : A point-in-time snapshot of aggregate system metrics.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StorageSnapshot {
    /// The date this snapshot was captured (YYYY-MM-DD).
    #[serde(rename = "snapshot_date")]
    pub snapshot_date: String,
    /// Total number of repositories at the time of the snapshot.
    #[serde(rename = "total_repositories")]
    pub total_repositories: i32,
    /// Total number of artifacts across all repositories.
    #[serde(rename = "total_artifacts")]
    pub total_artifacts: i32,
    /// Total storage consumed in bytes.
    #[serde(rename = "total_storage_bytes")]
    pub total_storage_bytes: i64,
    /// Cumulative download count at the time of the snapshot.
    #[serde(rename = "total_downloads")]
    pub total_downloads: i64,
    /// Total number of registered users.
    #[serde(rename = "total_users")]
    pub total_users: i32,
}

impl StorageSnapshot {
    /// A point-in-time snapshot of aggregate system metrics.
    pub fn new(snapshot_date: String, total_repositories: i32, total_artifacts: i32, total_storage_bytes: i64, total_downloads: i64, total_users: i32) -> StorageSnapshot {
        StorageSnapshot {
            snapshot_date,
            total_repositories,
            total_artifacts,
            total_storage_bytes,
            total_downloads,
            total_users,
        }
    }
}

