artifact-keeper-client 1.2.1

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.2.1
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ArtifactMetadataResponse {
    #[serde(rename = "artifact_id")]
    pub artifact_id: uuid::Uuid,
    #[serde(rename = "format")]
    pub format: String,
    #[serde(rename = "metadata", deserialize_with = "Option::deserialize")]
    pub metadata: Option<serde_json::Value>,
    #[serde(rename = "properties", deserialize_with = "Option::deserialize")]
    pub properties: Option<serde_json::Value>,
}

impl ArtifactMetadataResponse {
    pub fn new(artifact_id: uuid::Uuid, format: String, metadata: Option<serde_json::Value>, properties: Option<serde_json::Value>) -> ArtifactMetadataResponse {
        ArtifactMetadataResponse {
            artifact_id,
            format,
            metadata,
            properties,
        }
    }
}