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};

/// VulnerabilityItem : the vulnerability item info
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct VulnerabilityItem {
    /// the project ID of the artifact
    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<i64>,
    /// the repository name of the artifact
    #[serde(rename = "repository_name", skip_serializing_if = "Option::is_none")]
    pub repository_name: Option<String>,
    /// the digest of the artifact
    #[serde(rename = "digest", skip_serializing_if = "Option::is_none")]
    pub digest: Option<String>,
    /// the tags of the artifact
    #[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Vec<String>>,
    /// the CVE id of the vulnerability.
    #[serde(rename = "cve_id", skip_serializing_if = "Option::is_none")]
    pub cve_id: Option<String>,
    /// the severity of the vulnerability
    #[serde(rename = "severity", skip_serializing_if = "Option::is_none")]
    pub severity: Option<String>,
    /// the nvd cvss v3 score of the vulnerability
    #[serde(rename = "cvss_v3_score", skip_serializing_if = "Option::is_none")]
    pub cvss_v3_score: Option<f32>,
    /// the package of the vulnerability
    #[serde(rename = "package", skip_serializing_if = "Option::is_none")]
    pub package: Option<String>,
    /// the version of the package
    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
    pub version: Option<String>,
    /// the fixed version of the package
    #[serde(rename = "fixed_version", skip_serializing_if = "Option::is_none")]
    pub fixed_version: Option<String>,
    /// The description of the vulnerability
    #[serde(rename = "desc", skip_serializing_if = "Option::is_none")]
    pub desc: Option<String>,
    /// Links of the vulnerability
    #[serde(rename = "links", skip_serializing_if = "Option::is_none")]
    pub links: Option<Vec<String>>,
}

impl VulnerabilityItem {
    /// the vulnerability item info
    pub fn new() -> VulnerabilityItem {
        VulnerabilityItem {
            project_id: None,
            repository_name: None,
            digest: None,
            tags: None,
            cve_id: None,
            severity: None,
            cvss_v3_score: None,
            package: None,
            version: None,
            fixed_version: None,
            desc: None,
            links: None,
        }
    }
}