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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ChecksumArtifact {
    #[serde(rename = "checksum_sha256")]
    pub checksum_sha256: String,
    #[serde(rename = "content_type")]
    pub content_type: String,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "download_count")]
    pub download_count: i64,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[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,
    #[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub version: Option<Option<String>>,
}

impl ChecksumArtifact {
    pub fn new(checksum_sha256: String, content_type: String, created_at: String, download_count: i64, id: uuid::Uuid, name: String, path: String, repository_key: String, size_bytes: i64) -> ChecksumArtifact {
        ChecksumArtifact {
            checksum_sha256,
            content_type,
            created_at,
            download_count,
            id,
            name,
            path,
            repository_key,
            size_bytes,
            version: None,
        }
    }
}