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

/// DtProject : Dependency-Track project representation
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DtProject {
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "lastBomImport", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_bom_import: Option<Option<i64>>,
    #[serde(rename = "lastBomImportFormat", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_bom_import_format: Option<Option<String>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "uuid")]
    pub uuid: String,
    #[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub version: Option<Option<String>>,
}

impl DtProject {
    /// Dependency-Track project representation
    pub fn new(name: String, uuid: String) -> DtProject {
        DtProject {
            description: None,
            last_bom_import: None,
            last_bom_import_format: None,
            name,
            uuid,
            version: None,
        }
    }
}

