harbor_api/models/
configurations.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 Configurations {
16    /// The auth mode of current system, such as \"db_auth\", \"ldap_auth\", \"oidc_auth\"
17    #[serde(rename = "auth_mode", skip_serializing_if = "Option::is_none")]
18    pub auth_mode: Option<String>,
19    /// The flag to indicate whether the current auth mode should consider as a primary one.
20    #[serde(rename = "primary_auth_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
21    pub primary_auth_mode: Option<Option<bool>>,
22    /// The Base DN for LDAP binding.
23    #[serde(rename = "ldap_base_dn", skip_serializing_if = "Option::is_none")]
24    pub ldap_base_dn: Option<String>,
25    /// The filter for LDAP search
26    #[serde(rename = "ldap_filter", skip_serializing_if = "Option::is_none")]
27    pub ldap_filter: Option<String>,
28    /// The base DN to search LDAP group.
29    #[serde(rename = "ldap_group_base_dn", skip_serializing_if = "Option::is_none")]
30    pub ldap_group_base_dn: Option<String>,
31    /// Specify the ldap group which have the same privilege with Harbor admin
32    #[serde(rename = "ldap_group_admin_dn", skip_serializing_if = "Option::is_none")]
33    pub ldap_group_admin_dn: Option<String>,
34    /// The attribute which is used as identity of the LDAP group, default is cn.'
35    #[serde(rename = "ldap_group_attribute_name", skip_serializing_if = "Option::is_none")]
36    pub ldap_group_attribute_name: Option<String>,
37    /// The filter to search the ldap group
38    #[serde(rename = "ldap_group_search_filter", skip_serializing_if = "Option::is_none")]
39    pub ldap_group_search_filter: Option<String>,
40    /// The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''
41    #[serde(rename = "ldap_group_search_scope", skip_serializing_if = "Option::is_none")]
42    pub ldap_group_search_scope: Option<i32>,
43    /// Attach LDAP user group information in parallel, the parallel worker count is 5
44    #[serde(rename = "ldap_group_attach_parallel", skip_serializing_if = "Option::is_none")]
45    pub ldap_group_attach_parallel: Option<bool>,
46    /// The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
47    #[serde(rename = "ldap_scope", skip_serializing_if = "Option::is_none")]
48    pub ldap_scope: Option<i32>,
49    /// The DN of the user to do the search.
50    #[serde(rename = "ldap_search_dn", skip_serializing_if = "Option::is_none")]
51    pub ldap_search_dn: Option<String>,
52    /// The password of the ldap search dn
53    #[serde(rename = "ldap_search_password", skip_serializing_if = "Option::is_none")]
54    pub ldap_search_password: Option<String>,
55    /// Timeout in seconds for connection to LDAP server
56    #[serde(rename = "ldap_timeout", skip_serializing_if = "Option::is_none")]
57    pub ldap_timeout: Option<i32>,
58    /// The attribute which is used as identity for the LDAP binding, such as \"CN\" or \"SAMAccountname\"
59    #[serde(rename = "ldap_uid", skip_serializing_if = "Option::is_none")]
60    pub ldap_uid: Option<String>,
61    /// The URL of LDAP server
62    #[serde(rename = "ldap_url", skip_serializing_if = "Option::is_none")]
63    pub ldap_url: Option<String>,
64    /// Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.
65    #[serde(rename = "ldap_verify_cert", skip_serializing_if = "Option::is_none")]
66    pub ldap_verify_cert: Option<bool>,
67    /// The user attribute to identify the group membership
68    #[serde(rename = "ldap_group_membership_attribute", skip_serializing_if = "Option::is_none")]
69    pub ldap_group_membership_attribute: Option<String>,
70    /// Indicate who can create projects, it could be ''adminonly'' or ''everyone''.
71    #[serde(rename = "project_creation_restriction", skip_serializing_if = "Option::is_none")]
72    pub project_creation_restriction: Option<String>,
73    /// The flag to indicate whether Harbor is in readonly mode.
74    #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")]
75    pub read_only: Option<bool>,
76    /// Whether the Harbor instance supports self-registration.  If it''s set to false, admin need to add user to the instance.
77    #[serde(rename = "self_registration", skip_serializing_if = "Option::is_none")]
78    pub self_registration: Option<bool>,
79    /// The expiration time of the token for internal Registry, in minutes.
80    #[serde(rename = "token_expiration", skip_serializing_if = "Option::is_none")]
81    pub token_expiration: Option<i32>,
82    /// The client id of UAA
83    #[serde(rename = "uaa_client_id", skip_serializing_if = "Option::is_none")]
84    pub uaa_client_id: Option<String>,
85    /// The client secret of the UAA
86    #[serde(rename = "uaa_client_secret", skip_serializing_if = "Option::is_none")]
87    pub uaa_client_secret: Option<String>,
88    /// The endpoint of the UAA
89    #[serde(rename = "uaa_endpoint", skip_serializing_if = "Option::is_none")]
90    pub uaa_endpoint: Option<String>,
91    /// Verify the certificate in UAA server
92    #[serde(rename = "uaa_verify_cert", skip_serializing_if = "Option::is_none")]
93    pub uaa_verify_cert: Option<bool>,
94    /// The endpoint of the HTTP auth
95    #[serde(rename = "http_authproxy_endpoint", skip_serializing_if = "Option::is_none")]
96    pub http_authproxy_endpoint: Option<String>,
97    /// The token review endpoint
98    #[serde(rename = "http_authproxy_tokenreview_endpoint", skip_serializing_if = "Option::is_none")]
99    pub http_authproxy_tokenreview_endpoint: Option<String>,
100    /// The group which has the harbor admin privileges
101    #[serde(rename = "http_authproxy_admin_groups", skip_serializing_if = "Option::is_none")]
102    pub http_authproxy_admin_groups: Option<String>,
103    /// The username which has the harbor admin privileges
104    #[serde(rename = "http_authproxy_admin_usernames", skip_serializing_if = "Option::is_none")]
105    pub http_authproxy_admin_usernames: Option<String>,
106    /// Verify the HTTP auth provider's certificate
107    #[serde(rename = "http_authproxy_verify_cert", skip_serializing_if = "Option::is_none")]
108    pub http_authproxy_verify_cert: Option<bool>,
109    /// Search user before onboard
110    #[serde(rename = "http_authproxy_skip_search", skip_serializing_if = "Option::is_none")]
111    pub http_authproxy_skip_search: Option<bool>,
112    /// The certificate of the HTTP auth provider
113    #[serde(rename = "http_authproxy_server_certificate", skip_serializing_if = "Option::is_none")]
114    pub http_authproxy_server_certificate: Option<String>,
115    /// The OIDC provider name
116    #[serde(rename = "oidc_name", skip_serializing_if = "Option::is_none")]
117    pub oidc_name: Option<String>,
118    /// The endpoint of the OIDC provider
119    #[serde(rename = "oidc_endpoint", skip_serializing_if = "Option::is_none")]
120    pub oidc_endpoint: Option<String>,
121    /// The client ID of the OIDC provider
122    #[serde(rename = "oidc_client_id", skip_serializing_if = "Option::is_none")]
123    pub oidc_client_id: Option<String>,
124    /// The OIDC provider secret
125    #[serde(rename = "oidc_client_secret", skip_serializing_if = "Option::is_none")]
126    pub oidc_client_secret: Option<String>,
127    /// The attribute claims the group name
128    #[serde(rename = "oidc_groups_claim", skip_serializing_if = "Option::is_none")]
129    pub oidc_groups_claim: Option<String>,
130    /// The OIDC group which has the harbor admin privileges
131    #[serde(rename = "oidc_admin_group", skip_serializing_if = "Option::is_none")]
132    pub oidc_admin_group: Option<String>,
133    /// The OIDC group filter which filters out the group name doesn't match the regular expression
134    #[serde(rename = "oidc_group_filter", skip_serializing_if = "Option::is_none")]
135    pub oidc_group_filter: Option<String>,
136    /// The scope of the OIDC provider
137    #[serde(rename = "oidc_scope", skip_serializing_if = "Option::is_none")]
138    pub oidc_scope: Option<String>,
139    /// The attribute claims the username
140    #[serde(rename = "oidc_user_claim", skip_serializing_if = "Option::is_none")]
141    pub oidc_user_claim: Option<String>,
142    /// Verify the OIDC provider's certificate'
143    #[serde(rename = "oidc_verify_cert", skip_serializing_if = "Option::is_none")]
144    pub oidc_verify_cert: Option<bool>,
145    /// Auto onboard the OIDC user
146    #[serde(rename = "oidc_auto_onboard", skip_serializing_if = "Option::is_none")]
147    pub oidc_auto_onboard: Option<bool>,
148    /// Extra parameters to add when redirect request to OIDC provider
149    #[serde(rename = "oidc_extra_redirect_parms", skip_serializing_if = "Option::is_none")]
150    pub oidc_extra_redirect_parms: Option<String>,
151    /// The robot account token duration in days
152    #[serde(rename = "robot_token_duration", skip_serializing_if = "Option::is_none")]
153    pub robot_token_duration: Option<i32>,
154    /// The rebot account name prefix
155    #[serde(rename = "robot_name_prefix", skip_serializing_if = "Option::is_none")]
156    pub robot_name_prefix: Option<String>,
157    /// Enable notification
158    #[serde(rename = "notification_enable", skip_serializing_if = "Option::is_none")]
159    pub notification_enable: Option<bool>,
160    /// Enable quota per project
161    #[serde(rename = "quota_per_project_enable", skip_serializing_if = "Option::is_none")]
162    pub quota_per_project_enable: Option<bool>,
163    /// The storage quota per project
164    #[serde(rename = "storage_per_project", skip_serializing_if = "Option::is_none")]
165    pub storage_per_project: Option<i32>,
166    /// The audit log forward endpoint
167    #[serde(rename = "audit_log_forward_endpoint", skip_serializing_if = "Option::is_none")]
168    pub audit_log_forward_endpoint: Option<String>,
169    /// Skip audit log database
170    #[serde(rename = "skip_audit_log_database", skip_serializing_if = "Option::is_none")]
171    pub skip_audit_log_database: Option<bool>,
172    /// The session timeout for harbor, in minutes.
173    #[serde(rename = "session_timeout", skip_serializing_if = "Option::is_none")]
174    pub session_timeout: Option<i32>,
175    /// Whether or not to skip update pull time for scanner
176    #[serde(rename = "scanner_skip_update_pulltime", skip_serializing_if = "Option::is_none")]
177    pub scanner_skip_update_pulltime: Option<bool>,
178    /// The banner message for the UI.It is the stringified result of the banner message object
179    #[serde(rename = "banner_message", skip_serializing_if = "Option::is_none")]
180    pub banner_message: Option<String>,
181}
182
183impl Configurations {
184    pub fn new() -> Configurations {
185        Configurations {
186            auth_mode: None,
187            primary_auth_mode: None,
188            ldap_base_dn: None,
189            ldap_filter: None,
190            ldap_group_base_dn: None,
191            ldap_group_admin_dn: None,
192            ldap_group_attribute_name: None,
193            ldap_group_search_filter: None,
194            ldap_group_search_scope: None,
195            ldap_group_attach_parallel: None,
196            ldap_scope: None,
197            ldap_search_dn: None,
198            ldap_search_password: None,
199            ldap_timeout: None,
200            ldap_uid: None,
201            ldap_url: None,
202            ldap_verify_cert: None,
203            ldap_group_membership_attribute: None,
204            project_creation_restriction: None,
205            read_only: None,
206            self_registration: None,
207            token_expiration: None,
208            uaa_client_id: None,
209            uaa_client_secret: None,
210            uaa_endpoint: None,
211            uaa_verify_cert: None,
212            http_authproxy_endpoint: None,
213            http_authproxy_tokenreview_endpoint: None,
214            http_authproxy_admin_groups: None,
215            http_authproxy_admin_usernames: None,
216            http_authproxy_verify_cert: None,
217            http_authproxy_skip_search: None,
218            http_authproxy_server_certificate: None,
219            oidc_name: None,
220            oidc_endpoint: None,
221            oidc_client_id: None,
222            oidc_client_secret: None,
223            oidc_groups_claim: None,
224            oidc_admin_group: None,
225            oidc_group_filter: None,
226            oidc_scope: None,
227            oidc_user_claim: None,
228            oidc_verify_cert: None,
229            oidc_auto_onboard: None,
230            oidc_extra_redirect_parms: None,
231            robot_token_duration: None,
232            robot_name_prefix: None,
233            notification_enable: None,
234            quota_per_project_enable: None,
235            storage_per_project: None,
236            audit_log_forward_endpoint: None,
237            skip_audit_log_database: None,
238            session_timeout: None,
239            scanner_skip_update_pulltime: None,
240            banner_message: None,
241        }
242    }
243}
244