/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HealthChecks {
    #[serde(rename = "database")]
    pub database: Box<models::CheckStatus>,
    #[serde(rename = "ldap", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub ldap: Option<Option<Box<models::CheckStatus>>>,
    #[serde(rename = "meilisearch", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub meilisearch: Option<Option<Box<models::CheckStatus>>>,
    #[serde(rename = "security_scanner", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub security_scanner: Option<Option<Box<models::CheckStatus>>>,
    #[serde(rename = "storage")]
    pub storage: Box<models::CheckStatus>,
}

impl HealthChecks {
    pub fn new(database: models::CheckStatus, storage: models::CheckStatus) -> HealthChecks {
        HealthChecks {
            database: Box::new(database),
            ldap: None,
            meilisearch: None,
            security_scanner: None,
            storage: Box::new(storage),
        }
    }
}

