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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DashboardResponse {
    #[serde(rename = "critical_findings")]
    pub critical_findings: i64,
    #[serde(rename = "high_findings")]
    pub high_findings: i64,
    #[serde(rename = "policy_violations_blocked")]
    pub policy_violations_blocked: i64,
    #[serde(rename = "repos_grade_a")]
    pub repos_grade_a: i64,
    #[serde(rename = "repos_grade_f")]
    pub repos_grade_f: i64,
    #[serde(rename = "repos_with_scanning")]
    pub repos_with_scanning: i64,
    #[serde(rename = "total_findings")]
    pub total_findings: i64,
    #[serde(rename = "total_scans")]
    pub total_scans: i64,
}

impl DashboardResponse {
    pub fn new(critical_findings: i64, high_findings: i64, policy_violations_blocked: i64, repos_grade_a: i64, repos_grade_f: i64, repos_with_scanning: i64, total_findings: i64, total_scans: i64) -> DashboardResponse {
        DashboardResponse {
            critical_findings,
            high_findings,
            policy_violations_blocked,
            repos_grade_a,
            repos_grade_f,
            repos_with_scanning,
            total_findings,
            total_scans,
        }
    }
}