1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/*
* Azisaba Graph API
*
* An API for connecting and sharing data across Azisaba Network.
*
* The version of the OpenAPI document: 0.0.1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// ListCrawls200ResponseItemsInner : The result of a single crawl of a Minecraft server.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ListCrawls200ResponseItemsInner {
/// The unique identifier of the crawl.
#[serde(rename = "id")]
pub id: uuid::Uuid,
/// The hostname or IP address of the crawled Minecraft server.
#[serde(rename = "address")]
pub address: String,
/// The port of the crawled Minecraft server.
#[serde(rename = "port")]
pub port: u16,
/// The server ping in milliseconds.
#[serde(rename = "ping")]
pub ping: u32,
/// The Minecraft version name reported by the server.
#[serde(rename = "version")]
pub version: String,
/// The Minecraft protocol version reported by the server.
#[serde(rename = "protocolVersion")]
pub protocol_version: i32,
/// The maximum number of players reported by the server.
#[serde(rename = "maxPlayers")]
pub max_players: u32,
/// The number of players currently connected to the server.
#[serde(rename = "onlinePlayers")]
pub online_players: u32,
/// The server description reported by the server.
#[serde(rename = "description", skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// The server favicon as a Base64-encoded PNG data URL, or `null` if no favicon was provided.
#[serde(rename = "favicon", deserialize_with = "Option::deserialize")]
pub favicon: Option<String>,
/// The date and time at which the server was crawled.
#[serde(rename = "crawledAt")]
pub crawled_at: chrono::DateTime<chrono::FixedOffset>,
}
impl ListCrawls200ResponseItemsInner {
/// The result of a single crawl of a Minecraft server.
pub fn new(id: uuid::Uuid, address: String, port: u16, ping: u32, version: String, protocol_version: i32, max_players: u32, online_players: u32, favicon: Option<String>, crawled_at: chrono::DateTime<chrono::FixedOffset>) -> ListCrawls200ResponseItemsInner {
ListCrawls200ResponseItemsInner {
id,
address,
port,
ping,
version,
protocol_version,
max_players,
online_players,
description: None,
favicon,
crawled_at,
}
}
}