/*
 * Tribufu API
 *
 * API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.3.0
 * Contact: contact@tribufu.com
 * Generated by: https://openapi-generator.tech
 */

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

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ProfileGame {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub name: Option<Option<String>>,
    #[serde(rename = "capsule_image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub capsule_image_url: Option<Option<String>>,
    #[serde(rename = "library_image_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub library_image_url: Option<Option<String>>,
    #[serde(rename = "slug", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub slug: Option<Option<String>>,
    #[serde(rename = "time_used", skip_serializing_if = "Option::is_none")]
    pub time_used: Option<f64>,
    #[serde(rename = "unlocked_achievements", skip_serializing_if = "Option::is_none")]
    pub unlocked_achievements: Option<i32>,
    #[serde(rename = "total_achievements", skip_serializing_if = "Option::is_none")]
    pub total_achievements: Option<i32>,
    #[serde(rename = "stats", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub stats: Option<Option<serde_json::Value>>,
    #[serde(rename = "acquired", skip_serializing_if = "Option::is_none")]
    pub acquired: Option<String>,
    #[serde(rename = "last_used", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_used: Option<Option<String>>,
}

impl ProfileGame {
    pub fn new() -> ProfileGame {
        ProfileGame {
            id: None,
            name: None,
            capsule_image_url: None,
            library_image_url: None,
            slug: None,
            time_used: None,
            unlocked_achievements: None,
            total_achievements: None,
            stats: None,
            acquired: None,
            last_used: None,
        }
    }
}

