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 DeviceResponse {
    /// Device codename, legacy
    #[serde(rename = "codename")]
    pub codename: String,
    /// Model name of device, does not include the OEM part, legacy
    #[serde(rename = "model_name")]
    pub model_name: String,
    #[serde(rename = "oem_name")]
    pub oem_name: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "codenames")]
    pub codenames: Vec<String>,
    #[serde(rename = "model_names")]
    pub model_names: Vec<String>,
    #[serde(rename = "supported")]
    pub supported: bool,
    #[serde(rename = "maintainer")]
    pub maintainer: Box<models::MaintainerShortModel>,
    #[serde(rename = "notes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub notes: Option<Option<String>>,
    #[serde(rename = "device_tree", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub device_tree: Option<Option<String>>,
    /// Full name of device / devices, legacy
    #[serde(rename = "full_name")]
    pub full_name: String,
    /// URL of the device on the official website
    #[serde(rename = "url")]
    pub url: String,
}

impl DeviceResponse {
    pub fn new(codename: String, model_name: String, oem_name: String, id: String, codenames: Vec<String>, model_names: Vec<String>, supported: bool, maintainer: models::MaintainerShortModel, full_name: String, url: String) -> DeviceResponse {
        DeviceResponse {
            codename,
            model_name,
            oem_name,
            id,
            codenames,
            model_names,
            supported,
            maintainer: Box::new(maintainer),
            notes: None,
            device_tree: None,
            full_name,
            url,
        }
    }
}