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

/// DtPolicyCondition : Policy condition that was violated
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DtPolicyCondition {
    #[serde(rename = "operator")]
    pub operator: String,
    #[serde(rename = "policy")]
    pub policy: Box<models::DtPolicy>,
    #[serde(rename = "subject")]
    pub subject: String,
    #[serde(rename = "uuid")]
    pub uuid: String,
    #[serde(rename = "value")]
    pub value: String,
}

impl DtPolicyCondition {
    /// Policy condition that was violated
    pub fn new(operator: String, policy: models::DtPolicy, subject: String, uuid: String, value: String) -> DtPolicyCondition {
        DtPolicyCondition {
            operator,
            policy: Box::new(policy),
            subject,
            uuid,
            value,
        }
    }
}

