/* * * * 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, #[serde( rename = "total", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none" )] pub total: Option>, } 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, } } }