Skip to main content

harbor_api/models/
dangerous_artifact.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/// DangerousArtifact : the dangerous artifact information
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct DangerousArtifact {
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 count of critical vulnerabilities
27    #[serde(rename = "critical_cnt", skip_serializing_if = "Option::is_none")]
28    pub critical_cnt: Option<i32>,
29    /// the count of high vulnerabilities
30    #[serde(rename = "high_cnt", skip_serializing_if = "Option::is_none")]
31    pub high_cnt: Option<i64>,
32    /// the count of medium vulnerabilities
33    #[serde(rename = "medium_cnt", skip_serializing_if = "Option::is_none")]
34    pub medium_cnt: Option<i32>,
35}
36
37impl DangerousArtifact {
38    /// the dangerous artifact information
39    pub fn new() -> DangerousArtifact {
40        DangerousArtifact {
41            project_id: None,
42            repository_name: None,
43            digest: None,
44            critical_cnt: None,
45            high_cnt: None,
46            medium_cnt: None,
47        }
48    }
49}
50