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

/// TestMetadata : Metadata returned from testing
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TestMetadata {
    #[serde(rename = "content_type")]
    pub content_type: String,
    #[serde(rename = "path")]
    pub path: 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 TestMetadata {
    /// Metadata returned from testing
    pub fn new(content_type: String, path: String, size_bytes: i64) -> TestMetadata {
        TestMetadata {
            content_type,
            path,
            size_bytes,
            version: None,
        }
    }
}

