/*
 * Artifact Keeper API
 *
 * REST API for Artifact Keeper, an open-source universal artifact registry. Covers user management, repositories, artifacts, search, security scanning, SBOM, dependency tracking, SSO, analytics, monitoring, telemetry, lifecycle policies, plugins, edge nodes, migration, and administration. Format-specific protocol endpoints (npm, PyPI, Maven, Docker/OCI, etc.) are not included; those follow their respective upstream specifications.
 *
 * The version of the OpenAPI document: 1.0.0-a2
 * 
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct MigrationReport {
    #[serde(rename = "job_id")]
    pub job_id: uuid::Uuid,
    #[serde(rename = "total_items")]
    pub total_items: i32,
    #[serde(rename = "completed_items")]
    pub completed_items: i32,
    #[serde(rename = "failed_items")]
    pub failed_items: i32,
    #[serde(rename = "skipped_items")]
    pub skipped_items: i32,
    #[serde(rename = "total_bytes")]
    pub total_bytes: i32,
    #[serde(rename = "transferred_bytes")]
    pub transferred_bytes: i32,
    #[serde(rename = "duration_seconds")]
    pub duration_seconds: i32,
    #[serde(rename = "errors")]
    pub errors: Vec<serde_json::Value>,
}

impl MigrationReport {
    pub fn new(job_id: uuid::Uuid, total_items: i32, completed_items: i32, failed_items: i32, skipped_items: i32, total_bytes: i32, transferred_bytes: i32, duration_seconds: i32, errors: Vec<serde_json::Value>) -> MigrationReport {
        MigrationReport {
            job_id,
            total_items,
            completed_items,
            failed_items,
            skipped_items,
            total_bytes,
            transferred_bytes,
            duration_seconds,
            errors,
        }
    }
}

