/*
 * 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 GameServerQuery {
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    #[serde(rename = "server_id", skip_serializing_if = "Option::is_none")]
    pub server_id: Option<String>,
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<models::GameServerStatus>,
    #[serde(rename = "ping", skip_serializing_if = "Option::is_none")]
    pub ping: Option<i32>,
    #[serde(rename = "current_players", skip_serializing_if = "Option::is_none")]
    pub current_players: Option<i32>,
    #[serde(rename = "max_players", skip_serializing_if = "Option::is_none")]
    pub max_players: 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 = "created", skip_serializing_if = "Option::is_none")]
    pub created: Option<String>,
}

impl GameServerQuery {
    pub fn new() -> GameServerQuery {
        GameServerQuery {
            id: None,
            server_id: None,
            status: None,
            ping: None,
            current_players: None,
            max_players: None,
            motd: None,
            created: None,
        }
    }
}

