/*
 * Orvanta API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.0.2
 * Contact: contact@orvanta.cloud
 * Generated by: https://openapi-generator.tech
 */

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

/// HealthChecks : Detailed health checks
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HealthChecks {
    #[serde(rename = "database")]
    pub database: Box<models::DatabaseHealth>,
    #[serde(rename = "workers", skip_serializing_if = "Option::is_none")]
    pub workers: Option<Box<models::WorkersHealth>>,
    #[serde(rename = "queue", skip_serializing_if = "Option::is_none")]
    pub queue: Option<Box<models::QueueHealth>>,
    #[serde(rename = "readiness")]
    pub readiness: Box<models::ReadinessHealth>,
}

impl HealthChecks {
    /// Detailed health checks
    pub fn new(database: models::DatabaseHealth, readiness: models::ReadinessHealth) -> HealthChecks {
        HealthChecks {
            database: Box::new(database),
            workers: None,
            queue: None,
            readiness: Box::new(readiness),
        }
    }
}

