mirror of
https://github.com/tribufu/sdk-rust
synced 2026-02-04 17:33:07 +00:00
Release v1.3.0
This commit is contained in:
41
src/models/game_server_status.rs
Normal file
41
src/models/game_server_status.rs
Normal file
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
|
||||
pub enum GameServerStatus {
|
||||
#[serde(rename = "unknown")]
|
||||
Unknown,
|
||||
#[serde(rename = "offline")]
|
||||
Offline,
|
||||
#[serde(rename = "online")]
|
||||
Online,
|
||||
|
||||
}
|
||||
|
||||
impl std::fmt::Display for GameServerStatus {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::Unknown => write!(f, "unknown"),
|
||||
Self::Offline => write!(f, "offline"),
|
||||
Self::Online => write!(f, "online"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for GameServerStatus {
|
||||
fn default() -> GameServerStatus {
|
||||
Self::Unknown
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user