/*
 * Tribufu API
 *
 * REST API to access Tribufu services.
 *
 * The version of the OpenAPI document: 1.1.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 GameServer {
    #[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 = "description", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub description: Option<Option<String>>,
    #[serde(rename = "address", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub address: Option<Option<String>>,
    #[serde(rename = "game_port", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub game_port: Option<Option<i32>>,
    #[serde(rename = "query_port", skip_serializing_if = "Option::is_none")]
    pub query_port: Option<i32>,
    #[serde(rename = "game_id", skip_serializing_if = "Option::is_none")]
    pub game_id: Option<String>,
    #[serde(rename = "game_icon_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub game_icon_url: Option<Option<String>>,
    #[serde(rename = "version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub version: Option<Option<String>>,
    #[serde(rename = "featured", skip_serializing_if = "Option::is_none")]
    pub featured: Option<bool>,
    #[serde(rename = "cluster_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub cluster_id: Option<Option<String>>,
    #[serde(rename = "website_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub website_url: Option<Option<String>>,
    #[serde(rename = "banner_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub banner_url: Option<Option<String>>,
    #[serde(rename = "owner_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub owner_id: Option<Option<String>>,
    #[serde(rename = "uptime", skip_serializing_if = "Option::is_none")]
    pub uptime: Option<f64>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::ServerStatus>,
    #[serde(rename = "ping", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub ping: Option<Option<i32>>,
    #[serde(rename = "map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub map: Option<Option<String>>,
    #[serde(rename = "used_slots", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub used_slots: Option<Option<i32>>,
    #[serde(rename = "max_slots", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub max_slots: Option<Option<i32>>,
    #[serde(rename = "motd", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub motd: Option<Option<String>>,
    #[serde(rename = "players", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub players: Option<Option<String>>,
    #[serde(rename = "last_online", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub last_online: Option<Option<String>>,
    #[serde(rename = "country", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub country: Option<Option<String>>,
    #[serde(rename = "steam", skip_serializing_if = "Option::is_none")]
    pub steam: Option<bool>,
    #[serde(rename = "discord_server_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub discord_server_id: Option<Option<String>>,
    #[serde(rename = "youtube_video_url", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub youtube_video_url: Option<Option<String>>,
    #[serde(rename = "tags", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub tags: Option<Option<String>>,
    #[serde(rename = "comment_count", skip_serializing_if = "Option::is_none")]
    pub comment_count: Option<i32>,
    #[serde(rename = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
    #[serde(rename = "updated", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
    pub updated: Option<Option<String>>,
}

impl GameServer {
    pub fn new() -> GameServer {
        GameServer {
            id: None,
            name: None,
            description: None,
            address: None,
            game_port: None,
            query_port: None,
            game_id: None,
            game_icon_url: None,
            version: None,
            featured: None,
            cluster_id: None,
            website_url: None,
            banner_url: None,
            owner_id: None,
            uptime: None,
            status: None,
            ping: None,
            map: None,
            used_slots: None,
            max_slots: None,
            motd: None,
            players: None,
            last_online: None,
            country: None,
            steam: None,
            discord_server_id: None,
            youtube_video_url: None,
            tags: None,
            comment_count: None,
            created: None,
            updated: None,
        }
    }
}

