artifact-keeper-client 1.1.6

Rust client for the Artifact Keeper REST API
Documentation
/*
 * 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};

/// StaleArtifact : Artifact aging report entry.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StaleArtifact {
    #[serde(rename = "artifact_id")]
    pub artifact_id: uuid::Uuid,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "days_since_download")]
    pub days_since_download: i64,
    #[serde(rename = "download_count")]
    pub download_count: i64,
    #[serde(rename = "last_downloaded_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_downloaded_at: Option<Option<String>>,
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "path")]
    pub path: String,
    #[serde(rename = "repository_key")]
    pub repository_key: String,
    #[serde(rename = "size_bytes")]
    pub size_bytes: i64,
}

impl StaleArtifact {
    /// Artifact aging report entry.
    pub fn new(artifact_id: uuid::Uuid, created_at: String, days_since_download: i64, download_count: i64, name: String, path: String, repository_key: String, size_bytes: i64) -> StaleArtifact {
        StaleArtifact {
            artifact_id,
            created_at,
            days_since_download,
            download_count,
            last_downloaded_at: None,
            name,
            path,
            repository_key,
            size_bytes,
        }
    }
}