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

/// DtPolicyFull : Full policy representation with conditions and projects
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DtPolicyFull {
    #[serde(rename = "includeChildren", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub include_children: Option<Option<bool>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "policyConditions")]
    pub policy_conditions: Vec<models::DtPolicyConditionFull>,
    #[serde(rename = "projects")]
    pub projects: Vec<models::DtProject>,
    #[serde(rename = "tags")]
    pub tags: Vec<serde_json::Value>,
    #[serde(rename = "uuid")]
    pub uuid: String,
    #[serde(rename = "violationState")]
    pub violation_state: String,
}

impl DtPolicyFull {
    /// Full policy representation with conditions and projects
    pub fn new(name: String, policy_conditions: Vec<models::DtPolicyConditionFull>, projects: Vec<models::DtProject>, tags: Vec<serde_json::Value>, uuid: String, violation_state: String) -> DtPolicyFull {
        DtPolicyFull {
            include_children: None,
            name,
            policy_conditions,
            projects,
            tags,
            uuid,
            violation_state,
        }
    }
}

