Skip to main content

harbor_api/models/
search_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 SearchRepository {
16    /// The ID of the project that the repository belongs to
17    #[serde(rename = "project_id", skip_serializing_if = "Option::is_none")]
18    pub project_id: Option<i32>,
19    /// The name of the project that the repository belongs to
20    #[serde(rename = "project_name", skip_serializing_if = "Option::is_none")]
21    pub project_name: Option<String>,
22    /// The flag to indicate the publicity of the project that the repository belongs to (1 is public, 0 is not)
23    #[serde(rename = "project_public", skip_serializing_if = "Option::is_none")]
24    pub project_public: Option<bool>,
25    /// The name of the repository
26    #[serde(rename = "repository_name", skip_serializing_if = "Option::is_none")]
27    pub repository_name: Option<String>,
28    /// The count how many times the repository is pulled
29    #[serde(rename = "pull_count", skip_serializing_if = "Option::is_none")]
30    pub pull_count: Option<i32>,
31    /// The count of artifacts in the repository
32    #[serde(rename = "artifact_count", skip_serializing_if = "Option::is_none")]
33    pub artifact_count: Option<i32>,
34}
35
36impl SearchRepository {
37    pub fn new() -> SearchRepository {
38        SearchRepository {
39            project_id: None,
40            project_name: None,
41            project_public: None,
42            repository_name: None,
43            pull_count: None,
44            artifact_count: None,
45        }
46    }
47}
48