Skip to main content

harbor_api/models/
general_info.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 GeneralInfo {
16    /// The banner message for the UI. It is the stringified result of the banner message object.
17    #[serde(rename = "banner_message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
18    pub banner_message: Option<Option<String>>,
19    /// The current time of the server.
20    #[serde(rename = "current_time", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub current_time: Option<Option<String>>,
22    /// The url of registry against which the docker command should be issued.
23    #[serde(rename = "registry_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24    pub registry_url: Option<Option<String>>,
25    /// The external URL of Harbor, with protocol.
26    #[serde(rename = "external_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27    pub external_url: Option<Option<String>>,
28    /// The auth mode of current Harbor instance.
29    #[serde(rename = "auth_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
30    pub auth_mode: Option<Option<String>>,
31    /// The flag to indicate whether the current auth mode should consider as a primary one.
32    #[serde(rename = "primary_auth_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
33    pub primary_auth_mode: Option<Option<bool>>,
34    /// Indicate who can create projects, it could be 'adminonly' or 'everyone'.
35    #[serde(rename = "project_creation_restriction", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
36    pub project_creation_restriction: Option<Option<String>>,
37    /// Indicate whether the Harbor instance enable user to register himself.
38    #[serde(rename = "self_registration", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
39    pub self_registration: Option<Option<bool>>,
40    /// Indicate whether there is a ca root cert file ready for download in the file system.
41    #[serde(rename = "has_ca_root", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
42    pub has_ca_root: Option<Option<bool>>,
43    /// The build version of Harbor.
44    #[serde(rename = "harbor_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
45    pub harbor_version: Option<Option<String>>,
46    /// The storage provider's name of Harbor registry
47    #[serde(rename = "registry_storage_provider_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
48    pub registry_storage_provider_name: Option<Option<String>>,
49    /// The flag to indicate whether Harbor is in readonly mode.
50    #[serde(rename = "read_only", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
51    pub read_only: Option<Option<bool>>,
52    /// The flag to indicate whether notification mechanism is enabled on Harbor instance.
53    #[serde(rename = "notification_enable", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
54    pub notification_enable: Option<Option<bool>>,
55    #[serde(rename = "authproxy_settings", skip_serializing_if = "Option::is_none")]
56    pub authproxy_settings: Option<Box<models::AuthproxySetting>>,
57    /// The OIDC provider name, empty if current auth is not OIDC_auth or OIDC provider is not configured.
58    #[serde(rename = "oidc_provider_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
59    pub oidc_provider_name: Option<Option<String>>,
60}
61
62impl GeneralInfo {
63    pub fn new() -> GeneralInfo {
64        GeneralInfo {
65            banner_message: None,
66            current_time: None,
67            registry_url: None,
68            external_url: None,
69            auth_mode: None,
70            primary_auth_mode: None,
71            project_creation_restriction: None,
72            self_registration: None,
73            has_ca_root: None,
74            harbor_version: None,
75            registry_storage_provider_name: None,
76            read_only: None,
77            notification_enable: None,
78            authproxy_settings: None,
79            oidc_provider_name: None,
80        }
81    }
82}
83