foxclient 5.3.0

Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement. To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit. The requests may be logged for analytics and development purposes.
Documentation
/*
 * Fox API
 *
 *  Warning: Please add a custom user agent header to your requests. This would help us fighting against DDoS attacks in future, while keeping your application's access to the API. In future, this may be a mandatory requirement.  To reduce the system load, the API endpoints are rate limited. The default limit is 30 requests per minute. Contact admin@orangefox.tech if you need a higher limit.  The requests may be logged for analytics and development purposes. 
 *
 * The version of the OpenAPI document: 5.3.0
 * Contact: admin@orangefox.tech
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReleaseResponse {
    #[serde(rename = "size")]
    pub size: i32,
    /// Release ID, that's how we indentify the release in the infrastructure
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "build_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub build_id: Option<Option<uuid::Uuid>>,
    #[serde(rename = "filename")]
    pub filename: String,
    #[serde(rename = "variant")]
    pub variant: String,
    #[serde(rename = "device_id")]
    pub device_id: String,
    /// Unix timestamp of the release date
    #[serde(rename = "date")]
    pub date: f64,
    #[serde(rename = "md5")]
    pub md5: String,
    #[serde(rename = "version")]
    pub version: String,
    #[serde(rename = "type")]
    pub r#type: models::ReleaseType,
    #[serde(rename = "maintainer_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub maintainer_id: Option<Option<String>>,
    #[serde(rename = "archived")]
    pub archived: bool,
    #[serde(rename = "recovery_img")]
    pub recovery_img: Box<models::RecoveryImgResponse>,
    #[serde(rename = "changelog")]
    pub changelog: Vec<String>,
    #[serde(rename = "bugs", deserialize_with = "Option::deserialize")]
    pub bugs: Option<Vec<String>>,
    #[serde(rename = "notes", deserialize_with = "Option::deserialize")]
    pub notes: Option<String>,
    /// URL of the release on the official website
    #[serde(rename = "url")]
    pub url: String,
    /// Mirrors list (deprecated)
    #[serde(rename = "mirrors")]
    pub mirrors: std::collections::HashMap<String, String>,
}

impl ReleaseResponse {
    pub fn new(size: i32, id: String, filename: String, variant: String, device_id: String, date: f64, md5: String, version: String, r#type: models::ReleaseType, archived: bool, recovery_img: models::RecoveryImgResponse, changelog: Vec<String>, bugs: Option<Vec<String>>, notes: Option<String>, url: String, mirrors: std::collections::HashMap<String, String>) -> ReleaseResponse {
        ReleaseResponse {
            size,
            id,
            build_id: None,
            filename,
            variant,
            device_id,
            date,
            md5,
            version,
            r#type,
            maintainer_id: None,
            archived,
            recovery_img: Box::new(recovery_img),
            changelog,
            bugs,
            notes,
            url,
            mirrors,
        }
    }
}