upcloud_rs/data/
server.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Deserialize, Debug)]
4pub struct UpcloudServerListRoot {
5 pub servers: UpcloudServerList,
6}
7
8#[derive(Deserialize, Debug)]
9pub struct UpcloudServerList {
10 pub server: Vec<UpcloudServer>,
11}
12
13#[derive(Deserialize, Debug)]
14pub struct UpcloudServerRoot {
15 pub server: UpcloudServer,
16}
17
18#[derive(Deserialize, Debug)]
19pub struct UpcloudServer {
20 pub core_number: String,
21 pub hostname: String,
22 pub labels: UpcloudLabelList,
23 pub license: u32,
24 pub memory_amount: String,
25 pub plan: String,
26 pub plan_ipv4_bytes: String,
27 pub plan_ipv6_bytes: String,
28 pub state: String,
29 pub tags: UpcloudTagList,
30 pub title: String,
31 pub uuid: String,
32 pub zone: String,
33}
34
35
36#[derive(Deserialize, Serialize, Debug)]
37pub struct UpcloudLabelList {
38 pub label: Vec<UpcloudLabel>
39}
40
41#[derive(Deserialize, Serialize, Debug)]
42pub struct UpcloudLabel {
43 pub key: String,
44 pub value: String,
45}
46
47#[derive(Deserialize, Debug)]
48pub struct UpcloudTagList {
49 pub tag: Vec<String>
50}