/*
 * 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 RuleEvaluationResponse {
    #[serde(rename = "passed")]
    pub passed: bool,
    #[serde(rename = "rule_id")]
    pub rule_id: uuid::Uuid,
    #[serde(rename = "rule_name")]
    pub rule_name: String,
    #[serde(rename = "violations")]
    pub violations: Vec<String>,
}

impl RuleEvaluationResponse {
    pub fn new(passed: bool, rule_id: uuid::Uuid, rule_name: String, violations: Vec<String>) -> RuleEvaluationResponse {
        RuleEvaluationResponse {
            passed,
            rule_id,
            rule_name,
            violations,
        }
    }
}

