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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Project {
    /// Project ID
    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<i32>,
    /// The owner ID of the project always means the creator of the project.
    #[serde(rename = "owner_id", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<i32>,
    /// The name of the project.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// The ID of referenced registry when the project is a proxy cache project.
    #[serde(rename = "registry_id", skip_serializing_if = "Option::is_none")]
    pub registry_id: Option<i64>,
    /// The creation time of the project.
    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
    pub creation_time: Option<String>,
    /// The update time of the project.
    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
    pub update_time: Option<String>,
    /// A deletion mark of the project.
    #[serde(rename = "deleted", skip_serializing_if = "Option::is_none")]
    pub deleted: Option<bool>,
    /// The owner name of the project.
    #[serde(rename = "owner_name", skip_serializing_if = "Option::is_none")]
    pub owner_name: Option<String>,
    /// Correspond to the UI about whether the project's publicity is  updatable (for UI)
    #[serde(rename = "togglable", skip_serializing_if = "Option::is_none")]
    pub togglable: Option<bool>,
    /// The role ID with highest permission of the current user who triggered the API (for UI).  This attribute is deprecated and will be removed in future versions.
    #[serde(rename = "current_user_role_id", skip_serializing_if = "Option::is_none")]
    pub current_user_role_id: Option<i32>,
    /// The list of role ID of the current user who triggered the API (for UI)
    #[serde(rename = "current_user_role_ids", skip_serializing_if = "Option::is_none")]
    pub current_user_role_ids: Option<Vec<i32>>,
    /// The number of the repositories under this project.
    #[serde(rename = "repo_count", skip_serializing_if = "Option::is_none")]
    pub repo_count: Option<i32>,
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<Box<models::ProjectMetadata>>,
    #[serde(rename = "cve_allowlist", skip_serializing_if = "Option::is_none")]
    pub cve_allowlist: Option<Box<models::CveAllowlist>>,
}

impl Project {
    pub fn new() -> Project {
        Project {
            project_id: None,
            owner_id: None,
            name: None,
            registry_id: None,
            creation_time: None,
            update_time: None,
            deleted: None,
            owner_name: None,
            togglable: None,
            current_user_role_id: None,
            current_user_role_ids: None,
            repo_count: None,
            metadata: None,
            cve_allowlist: None,
        }
    }
}