harbor_api/models/
vulnerability_item.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/// VulnerabilityItem : the vulnerability item info
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct VulnerabilityItem {
17    /// the project ID of the artifact
18    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
19    pub project_id: Option<i64>,
20    /// the repository name of the artifact
21    #[serde(rename = "repository_name", skip_serializing_if = "Option::is_none")]
22    pub repository_name: Option<String>,
23    /// the digest of the artifact
24    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
25    pub digest: Option<String>,
26    /// the tags of the artifact
27    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
28    pub tags: Option<Vec<String>>,
29    /// the CVE id of the vulnerability.
30    #[serde(rename = "cve_id", skip_serializing_if = "Option::is_none")]
31    pub cve_id: Option<String>,
32    /// the severity of the vulnerability
33    #[serde(rename = "severity", skip_serializing_if = "Option::is_none")]
34    pub severity: Option<String>,
35    /// the nvd cvss v3 score of the vulnerability
36    #[serde(rename = "cvss_v3_score", skip_serializing_if = "Option::is_none")]
37    pub cvss_v3_score: Option<f32>,
38    /// the package of the vulnerability
39    #[serde(rename = "package", skip_serializing_if = "Option::is_none")]
40    pub package: Option<String>,
41    /// the version of the package
42    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
43    pub version: Option<String>,
44    /// the fixed version of the package
45    #[serde(rename = "fixed_version", skip_serializing_if = "Option::is_none")]
46    pub fixed_version: Option<String>,
47    /// The description of the vulnerability
48    #[serde(rename = "desc", skip_serializing_if = "Option::is_none")]
49    pub desc: Option<String>,
50    /// Links of the vulnerability
51    #[serde(rename = "links", skip_serializing_if = "Option::is_none")]
52    pub links: Option<Vec<String>>,
53}
54
55impl VulnerabilityItem {
56    /// the vulnerability item info
57    pub fn new() -> VulnerabilityItem {
58        VulnerabilityItem {
59            project_id: None,
60            repository_name: None,
61            digest: None,
62            tags: None,
63            cve_id: None,
64            severity: None,
65            cvss_v3_score: None,
66            package: None,
67            version: None,
68            fixed_version: None,
69            desc: None,
70            links: None,
71        }
72    }
73}
74