linode_rs/data/
linode_instance.rs1use serde::Deserialize;
2
3#[derive(Deserialize, Debug)]
4pub struct LinodeInstanceListRoot {
5 pub data: Vec<LinodeInstance>,
6 pub page: u32,
7 pub pages: u32,
8 pub results: u32,
9}
10
11#[derive(Deserialize, Debug)]
12pub struct LinodeInstance {
13 pub alerts: LinodeInstanceAlerts,
14 pub backups: LinodeInstanceBackups,
15 pub created: String,
16 pub group: String,
17 pub has_user_data: bool,
18 pub host_uuid: String,
19 pub hypervisor: String,
20 pub id: u64,
21 pub image: Option<String>,
22 pub ipv4: Vec<String>,
23 pub ipv6: String,
24 pub label: String,
25 pub region: String,
26 pub specs: LinodeInstanceSpecs,
27 pub status: String,
28 pub tags: Vec<String>,
29 #[serde(rename = "type")]
30 pub ttype: String,
31 pub updated: String,
32 pub watchdog_enabled: bool,
33}
34
35#[derive(Deserialize, Debug)]
36pub struct LinodeInstanceSpecs {
37 pub disk: u64,
38 pub gpus: u64,
39 pub memory: u64,
40 pub transfer: u64,
41 pub vcpus: u64,
42}
43
44#[derive(Deserialize, Debug)]
45pub struct LinodeInstanceAlerts {
46 pub cpu: u64,
47 pub io: u64,
48 pub network_in: u64,
49 pub network_out: u64,
50 pub transfer_quota: u64,
51}
52
53#[derive(Deserialize, Debug)]
54pub struct LinodeInstanceBackups {
55 pub available: bool,
56 pub enabled: bool,
57 pub last_successful: Option<String>,
58 pub schedule: LinodeInstanceBackupSchedule,
59}
60
61#[derive(Deserialize, Debug)]
62pub struct LinodeInstanceBackupSchedule {
63 pub day: Option<String>,
64 pub window: Option<String>,
65}