/*
 * 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};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct HealthDashboardResponse {
    #[serde(rename = "avg_health_score")]
    pub avg_health_score: i32,
    #[serde(rename = "repos_grade_a")]
    pub repos_grade_a: i64,
    #[serde(rename = "repos_grade_b")]
    pub repos_grade_b: i64,
    #[serde(rename = "repos_grade_c")]
    pub repos_grade_c: i64,
    #[serde(rename = "repos_grade_d")]
    pub repos_grade_d: i64,
    #[serde(rename = "repos_grade_f")]
    pub repos_grade_f: i64,
    #[serde(rename = "repositories")]
    pub repositories: Vec<models::RepoHealthResponse>,
    #[serde(rename = "total_artifacts_evaluated")]
    pub total_artifacts_evaluated: i64,
    #[serde(rename = "total_repositories")]
    pub total_repositories: i64,
}

impl HealthDashboardResponse {
    pub fn new(avg_health_score: i32, repos_grade_a: i64, repos_grade_b: i64, repos_grade_c: i64, repos_grade_d: i64, repos_grade_f: i64, repositories: Vec<models::RepoHealthResponse>, total_artifacts_evaluated: i64, total_repositories: i64) -> HealthDashboardResponse {
        HealthDashboardResponse {
            avg_health_score,
            repos_grade_a,
            repos_grade_b,
            repos_grade_c,
            repos_grade_d,
            repos_grade_f,
            repositories,
            total_artifacts_evaluated,
            total_repositories,
        }
    }
}

