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

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

/// DtComponentFull : Full component representation from Dependency-Track
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DtComponentFull {
    #[serde(rename = "cpe", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub cpe: Option<Option<String>>,
    #[serde(rename = "group", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub group: Option<Option<String>>,
    #[serde(rename = "isInternal", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub is_internal: Option<Option<bool>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "purl", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub purl: Option<Option<String>>,
    #[serde(rename = "resolvedLicense", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub resolved_license: Option<Option<Box<models::DtLicense>>>,
    #[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 DtComponentFull {
    /// Full component representation from Dependency-Track
    pub fn new(name: String, uuid: String) -> DtComponentFull {
        DtComponentFull {
            cpe: None,
            group: None,
            is_internal: None,
            name,
            purl: None,
            resolved_license: None,
            uuid,
            version: None,
        }
    }
}

