harbor_api/models/
cve_allowlist.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/// CveAllowlist : The CVE Allowlist for system or project
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CveAllowlist {
17    /// ID of the allowlist
18    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
19    pub id: Option<i32>,
20    /// ID of the project which the allowlist belongs to.  For system level allowlist this attribute is zero.
21    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
22    pub project_id: Option<i32>,
23    /// 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.
24    #[serde(rename = "expires_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
25    pub expires_at: Option<Option<i32>>,
26    #[serde(rename = "items", skip_serializing_if = "Option::is_none")]
27    pub items: Option<Vec<models::CveAllowlistItem>>,
28    /// The creation time of the allowlist.
29    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
30    pub creation_time: Option<String>,
31    /// The update time of the allowlist.
32    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
33    pub update_time: Option<String>,
34}
35
36impl CveAllowlist {
37    /// The CVE Allowlist for system or project
38    pub fn new() -> CveAllowlist {
39        CveAllowlist {
40            id: None,
41            project_id: None,
42            expires_at: None,
43            items: None,
44            creation_time: None,
45            update_time: None,
46        }
47    }
48}
49