/*
 * 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 UpdateDtAnalysisRequest {
    /// UUID of the Dependency-Track project
    #[serde(rename = "project_uuid")]
    pub project_uuid: uuid::Uuid,
    /// UUID of the component with the finding
    #[serde(rename = "component_uuid")]
    pub component_uuid: uuid::Uuid,
    /// UUID of the vulnerability
    #[serde(rename = "vulnerability_uuid")]
    pub vulnerability_uuid: uuid::Uuid,
    /// Analysis state (e.g. NOT_SET, EXPLOITABLE, IN_TRIAGE, FALSE_POSITIVE, NOT_AFFECTED)
    #[serde(rename = "state")]
    pub state: String,
    /// Justification for the analysis decision
    #[serde(rename = "justification", skip_serializing_if = "Option::is_none")]
    pub justification: Option<String>,
    /// Additional details about the analysis
    #[serde(rename = "details", skip_serializing_if = "Option::is_none")]
    pub details: Option<String>,
    /// Whether the finding should be suppressed
    #[serde(rename = "suppressed")]
    pub suppressed: bool,
}

impl UpdateDtAnalysisRequest {
    pub fn new(project_uuid: uuid::Uuid, component_uuid: uuid::Uuid, vulnerability_uuid: uuid::Uuid, state: String, suppressed: bool) -> UpdateDtAnalysisRequest {
        UpdateDtAnalysisRequest {
            project_uuid,
            component_uuid,
            vulnerability_uuid,
            state,
            justification: None,
            details: None,
            suppressed,
        }
    }
}

