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 GateEvaluationResponse {
    #[serde(rename = "action")]
    pub action: String,
    #[serde(rename = "component_scores")]
    pub component_scores: serde_json::Value,
    #[serde(rename = "gate_name")]
    pub gate_name: String,
    #[serde(rename = "health_grade")]
    pub health_grade: String,
    #[serde(rename = "health_score")]
    pub health_score: i32,
    #[serde(rename = "passed")]
    pub passed: bool,
    #[serde(rename = "violations")]
    pub violations: Vec<models::GateViolationResponse>,
}

impl GateEvaluationResponse {
    pub fn new(action: String, component_scores: serde_json::Value, gate_name: String, health_grade: String, health_score: i32, passed: bool, violations: Vec<models::GateViolationResponse>) -> GateEvaluationResponse {
        GateEvaluationResponse {
            action,
            component_scores,
            gate_name,
            health_grade,
            health_score,
            passed,
            violations,
        }
    }
}