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

/// DtPolicyViolation : Policy violation from Dependency-Track
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DtPolicyViolation {
    #[serde(rename = "component")]
    pub component: Box<models::DtComponent>,
    #[serde(rename = "policyCondition")]
    pub policy_condition: Box<models::DtPolicyCondition>,
    #[serde(rename = "type")]
    pub r#type: String,
    #[serde(rename = "uuid")]
    pub uuid: String,
}

impl DtPolicyViolation {
    /// Policy violation from Dependency-Track
    pub fn new(component: models::DtComponent, policy_condition: models::DtPolicyCondition, r#type: String, uuid: String) -> DtPolicyViolation {
        DtPolicyViolation {
            component: Box::new(component),
            policy_condition: Box::new(policy_condition),
            r#type,
            uuid,
        }
    }
}

