harbor_api/models/
security_summary.rs

1/*
2 * Harbor API
3 *
4 * These APIs provide services for manipulating Harbor project.
5 *
6 * The version of the OpenAPI document: 2.0
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// SecuritySummary : the security summary
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct SecuritySummary {
17    /// the count of critical vulnerabilities
18    #[serde(rename = "critical_cnt", skip_serializing_if = "Option::is_none")]
19    pub critical_cnt: Option<i64>,
20    /// the count of high vulnerabilities
21    #[serde(rename = "high_cnt", skip_serializing_if = "Option::is_none")]
22    pub high_cnt: Option<i64>,
23    /// the count of medium vulnerabilities
24    #[serde(rename = "medium_cnt", skip_serializing_if = "Option::is_none")]
25    pub medium_cnt: Option<i64>,
26    /// the count of low vulnerabilities
27    #[serde(rename = "low_cnt", skip_serializing_if = "Option::is_none")]
28    pub low_cnt: Option<i64>,
29    /// the count of none vulnerabilities
30    #[serde(rename = "none_cnt", skip_serializing_if = "Option::is_none")]
31    pub none_cnt: Option<i64>,
32    /// the count of unknown vulnerabilities
33    #[serde(rename = "unknown_cnt", skip_serializing_if = "Option::is_none")]
34    pub unknown_cnt: Option<i64>,
35    /// the count of total vulnerabilities
36    #[serde(rename = "total_vuls", skip_serializing_if = "Option::is_none")]
37    pub total_vuls: Option<i64>,
38    /// the count of scanned artifacts
39    #[serde(rename = "scanned_cnt", skip_serializing_if = "Option::is_none")]
40    pub scanned_cnt: Option<i64>,
41    /// the total count of artifacts
42    #[serde(rename = "total_artifact", skip_serializing_if = "Option::is_none")]
43    pub total_artifact: Option<i64>,
44    /// the count of fixable vulnerabilities
45    #[serde(rename = "fixable_cnt", skip_serializing_if = "Option::is_none")]
46    pub fixable_cnt: Option<i64>,
47    /// the list of dangerous CVEs
48    #[serde(rename = "dangerous_cves", skip_serializing_if = "Option::is_none")]
49    pub dangerous_cves: Option<Vec<models::DangerousCve>>,
50    /// the list of dangerous artifacts
51    #[serde(rename = "dangerous_artifacts", skip_serializing_if = "Option::is_none")]
52    pub dangerous_artifacts: Option<Vec<models::DangerousArtifact>>,
53}
54
55impl SecuritySummary {
56    /// the security summary
57    pub fn new() -> SecuritySummary {
58        SecuritySummary {
59            critical_cnt: None,
60            high_cnt: None,
61            medium_cnt: None,
62            low_cnt: None,
63            none_cnt: None,
64            unknown_cnt: None,
65            total_vuls: None,
66            scanned_cnt: None,
67            total_artifact: None,
68            fixable_cnt: None,
69            dangerous_cves: None,
70            dangerous_artifacts: None,
71        }
72    }
73}
74