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
use serde::Deserialize;

#[derive(Deserialize, Debug)]
pub struct LinodeTypeListRoot {
    pub data: Vec<LinodeType>,
    pub page: u32,
    pub pages: u32,
    pub results: u32,
}

#[derive(Deserialize, Debug)]
pub struct LinodeType {
    pub addons: LinodeTypeAddons,
    pub class: String,
    pub disk: u64,
    pub gpus: u64,
    pub id: String,
    pub label: String,
    pub memory: u64,
    pub network_out: u64,
    pub price: LinodeTypePrice,
    pub region_prices: Vec<LinodeTypeRegionPrice>,
    pub successor: Option<String>,
    pub transfer: u64,
    pub vcpus: u64,
}

#[derive(Deserialize, Debug)]
pub struct LinodeTypePrice {
    pub hourly: f32,
    pub monthly: f32,
}

#[derive(Deserialize, Debug)]
pub struct LinodeTypeRegionPrice {
    pub hourly: f32,
    pub id: String,
    pub monthly: f32,
}

#[derive(Deserialize, Debug)]
pub struct LinodeTypeAddons {
    pub backups: LinodeTypeAddon,
}

#[derive(Deserialize, Debug)]
pub struct LinodeTypeAddon {
    pub price: LinodeTypePrice,
    pub region_prices: Vec<LinodeTypeRegionPrice>,
}