harbor_api/models/
project_req.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#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ProjectReq {
16    /// The name of the project.
17    #[serde(rename = "project_name", skip_serializing_if = "Option::is_none")]
18    pub project_name: Option<String>,
19    /// deprecated, reserved for project creation in replication
20    #[serde(rename = "public", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub public: Option<Option<bool>>,
22    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
23    pub metadata: Option<Box<models::ProjectMetadata>>,
24    #[serde(rename = "cve_allowlist", skip_serializing_if = "Option::is_none")]
25    pub cve_allowlist: Option<Box<models::CveAllowlist>>,
26    /// The storage quota of the project.
27    #[serde(rename = "storage_limit", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
28    pub storage_limit: Option<Option<i64>>,
29    /// The ID of referenced registry when creating the proxy cache project
30    #[serde(rename = "registry_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
31    pub registry_id: Option<Option<i64>>,
32}
33
34impl ProjectReq {
35    pub fn new() -> ProjectReq {
36        ProjectReq {
37            project_name: None,
38            public: None,
39            metadata: None,
40            cve_allowlist: None,
41            storage_limit: None,
42            registry_id: None,
43        }
44    }
45}
46