harbor_api/models/
registry.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 Registry {
16    /// The registry ID.
17    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
18    pub id: Option<i64>,
19    /// The registry URL string.
20    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
21    pub url: Option<String>,
22    /// The registry name.
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    #[serde(rename = "credential", skip_serializing_if = "Option::is_none")]
26    pub credential: Option<Box<models::RegistryCredential>>,
27    /// Type of the registry, e.g. 'harbor'.
28    #[serde(rename = "type", skip_serializing_if = "Option::is_none")]
29    pub r#type: Option<String>,
30    /// Whether or not the certificate will be verified when Harbor tries to access the server.
31    #[serde(rename = "insecure", skip_serializing_if = "Option::is_none")]
32    pub insecure: Option<bool>,
33    /// Description of the registry.
34    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
35    pub description: Option<String>,
36    /// Health status of the registry.
37    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
38    pub status: Option<String>,
39    /// The create time of the policy.
40    #[serde(rename = "creation_time", skip_serializing_if = "Option::is_none")]
41    pub creation_time: Option<String>,
42    /// The update time of the policy.
43    #[serde(rename = "update_time", skip_serializing_if = "Option::is_none")]
44    pub update_time: Option<String>,
45}
46
47impl Registry {
48    pub fn new() -> Registry {
49        Registry {
50            id: None,
51            url: None,
52            name: None,
53            credential: None,
54            r#type: None,
55            insecure: None,
56            description: None,
57            status: None,
58            creation_time: None,
59            update_time: None,
60        }
61    }
62}
63