harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// SecuritySummary : the security summary
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SecuritySummary {
    /// the count of critical vulnerabilities
    #[serde(rename = "critical_cnt", skip_serializing_if = "Option::is_none")]
    pub critical_cnt: Option<i64>,
    /// the count of high vulnerabilities
    #[serde(rename = "high_cnt", skip_serializing_if = "Option::is_none")]
    pub high_cnt: Option<i64>,
    /// the count of medium vulnerabilities
    #[serde(rename = "medium_cnt", skip_serializing_if = "Option::is_none")]
    pub medium_cnt: Option<i64>,
    /// the count of low vulnerabilities
    #[serde(rename = "low_cnt", skip_serializing_if = "Option::is_none")]
    pub low_cnt: Option<i64>,
    /// the count of none vulnerabilities
    #[serde(rename = "none_cnt", skip_serializing_if = "Option::is_none")]
    pub none_cnt: Option<i64>,
    /// the count of unknown vulnerabilities
    #[serde(rename = "unknown_cnt", skip_serializing_if = "Option::is_none")]
    pub unknown_cnt: Option<i64>,
    /// the count of total vulnerabilities
    #[serde(rename = "total_vuls", skip_serializing_if = "Option::is_none")]
    pub total_vuls: Option<i64>,
    /// the count of scanned artifacts
    #[serde(rename = "scanned_cnt", skip_serializing_if = "Option::is_none")]
    pub scanned_cnt: Option<i64>,
    /// the total count of artifacts
    #[serde(rename = "total_artifact", skip_serializing_if = "Option::is_none")]
    pub total_artifact: Option<i64>,
    /// the count of fixable vulnerabilities
    #[serde(rename = "fixable_cnt", skip_serializing_if = "Option::is_none")]
    pub fixable_cnt: Option<i64>,
    /// the list of dangerous CVEs
    #[serde(rename = "dangerous_cves", skip_serializing_if = "Option::is_none")]
    pub dangerous_cves: Option<Vec<models::DangerousCve>>,
    /// the list of dangerous artifacts
    #[serde(rename = "dangerous_artifacts", skip_serializing_if = "Option::is_none")]
    pub dangerous_artifacts: Option<Vec<models::DangerousArtifact>>,
}

impl SecuritySummary {
    /// the security summary
    pub fn new() -> SecuritySummary {
        SecuritySummary {
            critical_cnt: None,
            high_cnt: None,
            medium_cnt: None,
            low_cnt: None,
            none_cnt: None,
            unknown_cnt: None,
            total_vuls: None,
            scanned_cnt: None,
            total_artifact: None,
            fixable_cnt: None,
            dangerous_cves: None,
            dangerous_artifacts: None,
        }
    }
}