foxclient 6.1.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: 6.1.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 {
    #[serde(rename = "_id")]
    pub _id: String,
    #[serde(rename = "codename")]
    pub codename: String,
    #[serde(rename = "codenames")]
    pub codenames: Vec<String>,
    #[serde(rename = "featured_text", skip_serializing_if = "Option::is_none")]
    pub featured_text: Option<String>,
    #[serde(rename = "full_name")]
    pub full_name: String,
    #[serde(rename = "id")]
    pub id: String,
    #[serde(rename = "is_featured")]
    pub is_featured: bool,
    #[serde(rename = "model_name")]
    pub model_name: String,
    #[serde(rename = "model_names")]
    pub model_names: Vec<String>,
    #[serde(rename = "oem_name")]
    pub oem_name: String,
    #[serde(rename = "supported")]
    pub supported: bool,
    #[serde(rename = "url")]
    pub url: String,
    #[serde(rename = "device_tree", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub device_tree: Option<Option<String>>,
    #[serde(rename = "maintainer")]
    pub maintainer: Box<models::MaintainerShortResponse>,
    #[serde(rename = "notes", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub notes: Option<Option<String>>,
}

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