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

/// CveAllowlist : The CVE Allowlist for system or project
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CveAllowlist {
    /// ID of the allowlist
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<i32>,
    /// ID of the project which the allowlist belongs to.  For system level allowlist this attribute is zero.
    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<i32>,
    /// the time for expiration of the allowlist, in the form of seconds since epoch.  This is an optional attribute, if it's not set the CVE allowlist does not expire.
    #[serde(rename = "expires_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub expires_at: Option<Option<i32>>,
    #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
    pub items: Option<Vec<models::CveAllowlistItem>>,
    /// The creation time of the allowlist.
    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
    pub creation_time: Option<String>,
    /// The update time of the allowlist.
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
}

impl CveAllowlist {
    /// The CVE Allowlist for system or project
    pub fn new() -> CveAllowlist {
        CveAllowlist {
            id: None,
            project_id: None,
            expires_at: None,
            items: None,
            creation_time: None,
            update_time: None,
        }
    }
}