trans4 / tests /integration-tests /client /src /models /download_progress.rs
Mayo
chore(fix): add missing client
0ae35fa unverified
Raw
History Blame Contribute Delete
1.17 kB
/*
*
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document:
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct DownloadProgress {
#[serde(rename = "downloaded")]
pub downloaded: u64,
#[serde(rename = "filename")]
pub filename: String,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "status")]
pub status: Box<models::DownloadStatus>,
#[serde(
rename = "total",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub total: Option<Option<u64>>,
}
impl DownloadProgress {
pub fn new(
downloaded: u64,
filename: String,
id: String,
status: models::DownloadStatus,
) -> DownloadProgress {
DownloadProgress {
downloaded,
filename,
id,
status: Box::new(status),
total: None,
}
}
}