mirror of
https://github.com/tribufu/sdk-rust
synced 2026-02-04 01:13:07 +00:00
Release v1.3.0
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
/*
|
||||
* Tribufu API
|
||||
*
|
||||
* REST API to access Tribufu services.
|
||||
* API to access Tribufu services.
|
||||
*
|
||||
* The version of the OpenAPI document: 1.1.0
|
||||
* The version of the OpenAPI document: 1.3.0
|
||||
* Contact: contact@tribufu.com
|
||||
* Generated by: https://openapi-generator.tech
|
||||
*/
|
||||
@@ -15,50 +15,34 @@ use serde::{Deserialize, Serialize};
|
||||
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 = "name", deserialize_with = "Option::deserialize")]
|
||||
pub name: 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 = "owner_id", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub owner_id: Option<Option<String>>,
|
||||
#[serde(rename = "address", deserialize_with = "Option::deserialize")]
|
||||
pub address: Option<String>,
|
||||
#[serde(rename = "query_port")]
|
||||
pub query_port: i32,
|
||||
#[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 = "map", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
|
||||
pub map: 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 = "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")]
|
||||
@@ -67,10 +51,6 @@ pub struct GameServer {
|
||||
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")]
|
||||
@@ -78,37 +58,27 @@ pub struct GameServer {
|
||||
}
|
||||
|
||||
impl GameServer {
|
||||
pub fn new() -> GameServer {
|
||||
pub fn new(name: Option<String>, address: Option<String>, query_port: i32) -> GameServer {
|
||||
GameServer {
|
||||
id: None,
|
||||
name: None,
|
||||
name,
|
||||
description: None,
|
||||
address: None,
|
||||
owner_id: None,
|
||||
address,
|
||||
query_port,
|
||||
game_port: None,
|
||||
query_port: None,
|
||||
map: None,
|
||||
version: 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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user