/*
 * 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 DtProject {
    /// Dependency-Track project UUID
    #[serde(rename = "uuid")]
    pub uuid: String,
    /// Project name
    #[serde(rename = "name")]
    pub name: String,
    /// Project version
    #[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub version: Option<Option<String>>,
    /// Project description
    #[serde(rename = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    /// Unix timestamp of the last BOM import
    #[serde(rename = "last_bom_import", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_bom_import: Option<Option<i32>>,
    /// Format of the last imported BOM (e.g. CycloneDX, SPDX)
    #[serde(rename = "last_bom_import_format", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_bom_import_format: Option<Option<String>>,
}

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

