/*
 * 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 DtAnalysis {
    /// Analysis state (e.g. NOT_SET, EXPLOITABLE, IN_TRIAGE, FALSE_POSITIVE, NOT_AFFECTED)
    #[serde(rename = "state", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub state: Option<Option<String>>,
    /// Justification for the analysis decision
    #[serde(rename = "justification", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub justification: Option<Option<String>>,
    /// Response action taken
    #[serde(rename = "response", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub response: Option<Option<String>>,
    /// Additional analysis details
    #[serde(rename = "details", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub details: Option<Option<String>>,
    /// Whether the finding is suppressed
    #[serde(rename = "is_suppressed")]
    pub is_suppressed: bool,
}

impl DtAnalysis {
    pub fn new(is_suppressed: bool) -> DtAnalysis {
        DtAnalysis {
            state: None,
            justification: None,
            response: None,
            details: None,
            is_suppressed,
        }
    }
}

