/*
 * 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 TransferSessionResponse {
    #[serde(rename = "artifact_checksum")]
    pub artifact_checksum: String,
    #[serde(rename = "artifact_id")]
    pub artifact_id: uuid::Uuid,
    #[serde(rename = "checksum_algo")]
    pub checksum_algo: String,
    #[serde(rename = "chunk_size")]
    pub chunk_size: i32,
    #[serde(rename = "completed_chunks")]
    pub completed_chunks: i32,
    #[serde(rename = "id")]
    pub id: uuid::Uuid,
    #[serde(rename = "requesting_peer_id")]
    pub requesting_peer_id: uuid::Uuid,
    #[serde(rename = "status")]
    pub status: String,
    #[serde(rename = "total_chunks")]
    pub total_chunks: i32,
    #[serde(rename = "total_size")]
    pub total_size: i64,
}

impl TransferSessionResponse {
    pub fn new(artifact_checksum: String, artifact_id: uuid::Uuid, checksum_algo: String, chunk_size: i32, completed_chunks: i32, id: uuid::Uuid, requesting_peer_id: uuid::Uuid, status: String, total_chunks: i32, total_size: i64) -> TransferSessionResponse {
        TransferSessionResponse {
            artifact_checksum,
            artifact_id,
            checksum_algo,
            chunk_size,
            completed_chunks,
            id,
            requesting_peer_id,
            status,
            total_chunks,
            total_size,
        }
    }
}

