artifact-keeper-client 1.2.1

Rust client for the Artifact Keeper REST API
Documentation
/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

/// AuthConfig : Authentication provider availability.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct AuthConfig {
    /// Whether an LDAP directory is configured.
    #[serde(rename = "ldap_enabled")]
    pub ldap_enabled: bool,
    /// Whether an OIDC provider is configured.
    #[serde(rename = "oidc_enabled")]
    pub oidc_enabled: bool,
    /// Whether SAML SSO is configured (derived from the SSO admin settings in the DB, but for this endpoint we report whether the OIDC issuer is set as a proxy).
    #[serde(rename = "sso_enabled")]
    pub sso_enabled: bool,
}

impl AuthConfig {
    /// Authentication provider availability.
    pub fn new(ldap_enabled: bool, oidc_enabled: bool, sso_enabled: bool) -> AuthConfig {
        AuthConfig {
            ldap_enabled,
            oidc_enabled,
            sso_enabled,
        }
    }
}