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

/// StorageGcResult : Result of a storage GC run.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct StorageGcResult {
    #[serde(rename = "artifacts_removed")]
    pub artifacts_removed: i64,
    #[serde(rename = "bytes_freed")]
    pub bytes_freed: i64,
    #[serde(rename = "dry_run")]
    pub dry_run: bool,
    #[serde(rename = "errors")]
    pub errors: Vec<String>,
    #[serde(rename = "storage_keys_deleted")]
    pub storage_keys_deleted: i64,
}

impl StorageGcResult {
    /// Result of a storage GC run.
    pub fn new(artifacts_removed: i64, bytes_freed: i64, dry_run: bool, errors: Vec<String>, storage_keys_deleted: i64) -> StorageGcResult {
        StorageGcResult {
            artifacts_removed,
            bytes_freed,
            dry_run,
            errors,
            storage_keys_deleted,
        }
    }
}

