/*
 * Artifact Keeper API
 *
 * Enterprise artifact registry supporting 45+ package formats.
 *
 * The version of the OpenAPI document: 1.0.0-rc.3
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateAnalysisBody {
    #[serde(rename = "component_uuid")]
    pub component_uuid: String,
    #[serde(rename = "details", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub details: Option<Option<String>>,
    #[serde(rename = "justification", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub justification: Option<Option<String>>,
    #[serde(rename = "project_uuid")]
    pub project_uuid: String,
    #[serde(rename = "state")]
    pub state: String,
    #[serde(rename = "suppressed", skip_serializing_if = "Option::is_none")]
    pub suppressed: Option<bool>,
    #[serde(rename = "vulnerability_uuid")]
    pub vulnerability_uuid: String,
}

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

