artifact-keeper-client 1.1.2

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 BackupResponse {
    #[serde(rename = "artifact_count")]
    pub artifact_count: i64,
    #[serde(rename = "completed_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub completed_at: Option<Option<String>>,
    #[serde(rename = "created_at")]
    pub created_at: String,
    #[serde(rename = "created_by", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub created_by: Option<Option<uuid::Uuid>>,
    #[serde(rename = "error_message", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub error_message: Option<Option<String>>,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "size_bytes")]
    pub size_bytes: i64,
    #[serde(rename = "started_at", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub started_at: Option<Option<String>>,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "storage_path", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub storage_path: Option<Option<String>>,
    #[serde(rename = "type")]
    pub r#type: String,
}

impl BackupResponse {
    pub fn new(artifact_count: i64, created_at: String, id: uuid::Uuid, size_bytes: i64, status: String, r#type: String) -> BackupResponse {
        BackupResponse {
            artifact_count,
            completed_at: None,
            created_at,
            created_by: None,
            error_message: None,
            id,
            size_bytes,
            started_at: None,
            status,
            storage_path: None,
            r#type,
        }
    }
}