harbor_api/models/
repository.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 Repository {
16    /// The ID of the repository
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i64>,
19    /// The ID of the project that the repository belongs to
20    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
21    pub project_id: Option<i64>,
22    /// The name of the repository
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    /// The description of the repository
26    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
27    pub description: Option<String>,
28    /// The count of the artifacts inside the repository
29    #[serde(rename = "artifact_count", skip_serializing_if = "Option::is_none")]
30    pub artifact_count: Option<i64>,
31    /// The count that the artifact inside the repository pulled
32    #[serde(rename = "pull_count", skip_serializing_if = "Option::is_none")]
33    pub pull_count: Option<i64>,
34    /// The creation time of the repository
35    #[serde(rename = "creation_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub creation_time: Option<Option<String>>,
37    /// The update time of the repository
38    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
39    pub update_time: Option<String>,
40}
41
42impl Repository {
43    pub fn new() -> Repository {
44        Repository {
45            id: None,
46            project_id: None,
47            name: None,
48            description: None,
49            artifact_count: None,
50            pull_count: None,
51            creation_time: None,
52            update_time: None,
53        }
54    }
55}
56