/*
 * 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 GetSecuritySummary200Response {
    #[serde(rename = "total_repositories")]
    pub total_repositories: i32,
    #[serde(rename = "scanned_repositories")]
    pub scanned_repositories: i32,
    #[serde(rename = "total_findings")]
    pub total_findings: i32,
    #[serde(rename = "critical_count")]
    pub critical_count: i32,
    #[serde(rename = "high_count")]
    pub high_count: i32,
    #[serde(rename = "medium_count")]
    pub medium_count: i32,
    #[serde(rename = "low_count")]
    pub low_count: i32,
    #[serde(rename = "last_scan_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_scan_at: Option<Option<String>>,
}

impl GetSecuritySummary200Response {
    pub fn new(total_repositories: i32, scanned_repositories: i32, total_findings: i32, critical_count: i32, high_count: i32, medium_count: i32, low_count: i32) -> GetSecuritySummary200Response {
        GetSecuritySummary200Response {
            total_repositories,
            scanned_repositories,
            total_findings,
            critical_count,
            high_count,
            medium_count,
            low_count,
            last_scan_at: None,
        }
    }
}

