/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DtPolicyCondition {
    /// Policy condition UUID
    #[serde(rename = "uuid")]
    pub uuid: String,
    /// Condition subject (e.g. AGE, COORDINATES, LICENSE, SEVERITY)
    #[serde(rename = "subject")]
    pub subject: String,
    /// Condition operator (e.g. IS, IS_NOT, MATCHES, CONTAINS)
    #[serde(rename = "operator")]
    pub operator: String,
    /// Condition value to evaluate against
    #[serde(rename = "value")]
    pub value: String,
    #[serde(rename = "policy")]
    pub policy: Box<models::DtPolicy>,
}

impl DtPolicyCondition {
    pub fn new(uuid: String, subject: String, operator: String, value: String, policy: models::DtPolicy) -> DtPolicyCondition {
        DtPolicyCondition {
            uuid,
            subject,
            operator,
            value,
            policy: Box::new(policy),
        }
    }
}

