harbor-api 2.0.0

These APIs provide services for manipulating Harbor project.
Documentation
/*
 * Harbor API
 *
 * These APIs provide services for manipulating Harbor project.
 *
 * The version of the OpenAPI document: 2.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Configurations {
    /// The auth mode of current system, such as \"db_auth\", \"ldap_auth\", \"oidc_auth\"
    #[serde(rename = "auth_mode", skip_serializing_if = "Option::is_none")]
    pub auth_mode: Option<String>,
    /// The flag to indicate whether the current auth mode should consider as a primary one.
    #[serde(rename = "primary_auth_mode", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub primary_auth_mode: Option<Option<bool>>,
    /// The Base DN for LDAP binding.
    #[serde(rename = "ldap_base_dn", skip_serializing_if = "Option::is_none")]
    pub ldap_base_dn: Option<String>,
    /// The filter for LDAP search
    #[serde(rename = "ldap_filter", skip_serializing_if = "Option::is_none")]
    pub ldap_filter: Option<String>,
    /// The base DN to search LDAP group.
    #[serde(rename = "ldap_group_base_dn", skip_serializing_if = "Option::is_none")]
    pub ldap_group_base_dn: Option<String>,
    /// Specify the ldap group which have the same privilege with Harbor admin
    #[serde(rename = "ldap_group_admin_dn", skip_serializing_if = "Option::is_none")]
    pub ldap_group_admin_dn: Option<String>,
    /// The attribute which is used as identity of the LDAP group, default is cn.'
    #[serde(rename = "ldap_group_attribute_name", skip_serializing_if = "Option::is_none")]
    pub ldap_group_attribute_name: Option<String>,
    /// The filter to search the ldap group
    #[serde(rename = "ldap_group_search_filter", skip_serializing_if = "Option::is_none")]
    pub ldap_group_search_filter: Option<String>,
    /// The scope to search ldap group. ''0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE''
    #[serde(rename = "ldap_group_search_scope", skip_serializing_if = "Option::is_none")]
    pub ldap_group_search_scope: Option<i32>,
    /// Attach LDAP user group information in parallel, the parallel worker count is 5
    #[serde(rename = "ldap_group_attach_parallel", skip_serializing_if = "Option::is_none")]
    pub ldap_group_attach_parallel: Option<bool>,
    /// The scope to search ldap users,'0-LDAP_SCOPE_BASE, 1-LDAP_SCOPE_ONELEVEL, 2-LDAP_SCOPE_SUBTREE'
    #[serde(rename = "ldap_scope", skip_serializing_if = "Option::is_none")]
    pub ldap_scope: Option<i32>,
    /// The DN of the user to do the search.
    #[serde(rename = "ldap_search_dn", skip_serializing_if = "Option::is_none")]
    pub ldap_search_dn: Option<String>,
    /// The password of the ldap search dn
    #[serde(rename = "ldap_search_password", skip_serializing_if = "Option::is_none")]
    pub ldap_search_password: Option<String>,
    /// Timeout in seconds for connection to LDAP server
    #[serde(rename = "ldap_timeout", skip_serializing_if = "Option::is_none")]
    pub ldap_timeout: Option<i32>,
    /// The attribute which is used as identity for the LDAP binding, such as \"CN\" or \"SAMAccountname\"
    #[serde(rename = "ldap_uid", skip_serializing_if = "Option::is_none")]
    pub ldap_uid: Option<String>,
    /// The URL of LDAP server
    #[serde(rename = "ldap_url", skip_serializing_if = "Option::is_none")]
    pub ldap_url: Option<String>,
    /// Whether verify your OIDC server certificate, disable it if your OIDC server is hosted via self-hosted certificate.
    #[serde(rename = "ldap_verify_cert", skip_serializing_if = "Option::is_none")]
    pub ldap_verify_cert: Option<bool>,
    /// The user attribute to identify the group membership
    #[serde(rename = "ldap_group_membership_attribute", skip_serializing_if = "Option::is_none")]
    pub ldap_group_membership_attribute: Option<String>,
    /// Indicate who can create projects, it could be ''adminonly'' or ''everyone''.
    #[serde(rename = "project_creation_restriction", skip_serializing_if = "Option::is_none")]
    pub project_creation_restriction: Option<String>,
    /// The flag to indicate whether Harbor is in readonly mode.
    #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")]
    pub read_only: Option<bool>,
    /// Whether the Harbor instance supports self-registration.  If it''s set to false, admin need to add user to the instance.
    #[serde(rename = "self_registration", skip_serializing_if = "Option::is_none")]
    pub self_registration: Option<bool>,
    /// The expiration time of the token for internal Registry, in minutes.
    #[serde(rename = "token_expiration", skip_serializing_if = "Option::is_none")]
    pub token_expiration: Option<i32>,
    /// The client id of UAA
    #[serde(rename = "uaa_client_id", skip_serializing_if = "Option::is_none")]
    pub uaa_client_id: Option<String>,
    /// The client secret of the UAA
    #[serde(rename = "uaa_client_secret", skip_serializing_if = "Option::is_none")]
    pub uaa_client_secret: Option<String>,
    /// The endpoint of the UAA
    #[serde(rename = "uaa_endpoint", skip_serializing_if = "Option::is_none")]
    pub uaa_endpoint: Option<String>,
    /// Verify the certificate in UAA server
    #[serde(rename = "uaa_verify_cert", skip_serializing_if = "Option::is_none")]
    pub uaa_verify_cert: Option<bool>,
    /// The endpoint of the HTTP auth
    #[serde(rename = "http_authproxy_endpoint", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_endpoint: Option<String>,
    /// The token review endpoint
    #[serde(rename = "http_authproxy_tokenreview_endpoint", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_tokenreview_endpoint: Option<String>,
    /// The group which has the harbor admin privileges
    #[serde(rename = "http_authproxy_admin_groups", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_admin_groups: Option<String>,
    /// The username which has the harbor admin privileges
    #[serde(rename = "http_authproxy_admin_usernames", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_admin_usernames: Option<String>,
    /// Verify the HTTP auth provider's certificate
    #[serde(rename = "http_authproxy_verify_cert", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_verify_cert: Option<bool>,
    /// Search user before onboard
    #[serde(rename = "http_authproxy_skip_search", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_skip_search: Option<bool>,
    /// The certificate of the HTTP auth provider
    #[serde(rename = "http_authproxy_server_certificate", skip_serializing_if = "Option::is_none")]
    pub http_authproxy_server_certificate: Option<String>,
    /// The OIDC provider name
    #[serde(rename = "oidc_name", skip_serializing_if = "Option::is_none")]
    pub oidc_name: Option<String>,
    /// The endpoint of the OIDC provider
    #[serde(rename = "oidc_endpoint", skip_serializing_if = "Option::is_none")]
    pub oidc_endpoint: Option<String>,
    /// The client ID of the OIDC provider
    #[serde(rename = "oidc_client_id", skip_serializing_if = "Option::is_none")]
    pub oidc_client_id: Option<String>,
    /// The OIDC provider secret
    #[serde(rename = "oidc_client_secret", skip_serializing_if = "Option::is_none")]
    pub oidc_client_secret: Option<String>,
    /// The attribute claims the group name
    #[serde(rename = "oidc_groups_claim", skip_serializing_if = "Option::is_none")]
    pub oidc_groups_claim: Option<String>,
    /// The OIDC group which has the harbor admin privileges
    #[serde(rename = "oidc_admin_group", skip_serializing_if = "Option::is_none")]
    pub oidc_admin_group: Option<String>,
    /// The OIDC group filter which filters out the group name doesn't match the regular expression
    #[serde(rename = "oidc_group_filter", skip_serializing_if = "Option::is_none")]
    pub oidc_group_filter: Option<String>,
    /// The scope of the OIDC provider
    #[serde(rename = "oidc_scope", skip_serializing_if = "Option::is_none")]
    pub oidc_scope: Option<String>,
    /// The attribute claims the username
    #[serde(rename = "oidc_user_claim", skip_serializing_if = "Option::is_none")]
    pub oidc_user_claim: Option<String>,
    /// Verify the OIDC provider's certificate'
    #[serde(rename = "oidc_verify_cert", skip_serializing_if = "Option::is_none")]
    pub oidc_verify_cert: Option<bool>,
    /// Auto onboard the OIDC user
    #[serde(rename = "oidc_auto_onboard", skip_serializing_if = "Option::is_none")]
    pub oidc_auto_onboard: Option<bool>,
    /// Extra parameters to add when redirect request to OIDC provider
    #[serde(rename = "oidc_extra_redirect_parms", skip_serializing_if = "Option::is_none")]
    pub oidc_extra_redirect_parms: Option<String>,
    /// The robot account token duration in days
    #[serde(rename = "robot_token_duration", skip_serializing_if = "Option::is_none")]
    pub robot_token_duration: Option<i32>,
    /// The rebot account name prefix
    #[serde(rename = "robot_name_prefix", skip_serializing_if = "Option::is_none")]
    pub robot_name_prefix: Option<String>,
    /// Enable notification
    #[serde(rename = "notification_enable", skip_serializing_if = "Option::is_none")]
    pub notification_enable: Option<bool>,
    /// Enable quota per project
    #[serde(rename = "quota_per_project_enable", skip_serializing_if = "Option::is_none")]
    pub quota_per_project_enable: Option<bool>,
    /// The storage quota per project
    #[serde(rename = "storage_per_project", skip_serializing_if = "Option::is_none")]
    pub storage_per_project: Option<i32>,
    /// The audit log forward endpoint
    #[serde(rename = "audit_log_forward_endpoint", skip_serializing_if = "Option::is_none")]
    pub audit_log_forward_endpoint: Option<String>,
    /// Skip audit log database
    #[serde(rename = "skip_audit_log_database", skip_serializing_if = "Option::is_none")]
    pub skip_audit_log_database: Option<bool>,
    /// The session timeout for harbor, in minutes.
    #[serde(rename = "session_timeout", skip_serializing_if = "Option::is_none")]
    pub session_timeout: Option<i32>,
    /// Whether or not to skip update pull time for scanner
    #[serde(rename = "scanner_skip_update_pulltime", skip_serializing_if = "Option::is_none")]
    pub scanner_skip_update_pulltime: Option<bool>,
    /// The banner message for the UI.It is the stringified result of the banner message object
    #[serde(rename = "banner_message", skip_serializing_if = "Option::is_none")]
    pub banner_message: Option<String>,
}

impl Configurations {
    pub fn new() -> Configurations {
        Configurations {
            auth_mode: None,
            primary_auth_mode: None,
            ldap_base_dn: None,
            ldap_filter: None,
            ldap_group_base_dn: None,
            ldap_group_admin_dn: None,
            ldap_group_attribute_name: None,
            ldap_group_search_filter: None,
            ldap_group_search_scope: None,
            ldap_group_attach_parallel: None,
            ldap_scope: None,
            ldap_search_dn: None,
            ldap_search_password: None,
            ldap_timeout: None,
            ldap_uid: None,
            ldap_url: None,
            ldap_verify_cert: None,
            ldap_group_membership_attribute: None,
            project_creation_restriction: None,
            read_only: None,
            self_registration: None,
            token_expiration: None,
            uaa_client_id: None,
            uaa_client_secret: None,
            uaa_endpoint: None,
            uaa_verify_cert: None,
            http_authproxy_endpoint: None,
            http_authproxy_tokenreview_endpoint: None,
            http_authproxy_admin_groups: None,
            http_authproxy_admin_usernames: None,
            http_authproxy_verify_cert: None,
            http_authproxy_skip_search: None,
            http_authproxy_server_certificate: None,
            oidc_name: None,
            oidc_endpoint: None,
            oidc_client_id: None,
            oidc_client_secret: None,
            oidc_groups_claim: None,
            oidc_admin_group: None,
            oidc_group_filter: None,
            oidc_scope: None,
            oidc_user_claim: None,
            oidc_verify_cert: None,
            oidc_auto_onboard: None,
            oidc_extra_redirect_parms: None,
            robot_token_duration: None,
            robot_name_prefix: None,
            notification_enable: None,
            quota_per_project_enable: None,
            storage_per_project: None,
            audit_log_forward_endpoint: None,
            skip_audit_log_database: None,
            session_timeout: None,
            scanner_skip_update_pulltime: None,
            banner_message: None,
        }
    }
}