scaleway_rs/data/
image.rs1use std::collections::HashMap;
2use serde::Deserialize;
3
4#[derive(Deserialize, Debug)]
5pub struct ScalewayImageRoot {
6 pub images: Vec<ScalewayImage>,
7}
8
9#[derive(Deserialize, Debug)]
10pub struct ScalewayImage {
11 pub id: String,
12 pub name: String,
13 pub arch: String,
14 pub creation_date: String,
15 pub modification_date: String,
16 pub from_server: Option<String>,
17 pub organization: String,
18 pub public: bool,
19 pub state: String,
20 pub project: String,
21 pub tags: Vec<String>,
22 pub zone: String,
23 pub root_volume: ScalewayImageRootVolume,
24 pub default_bootscript: Option<ScalewayImageBootscript>,
25 pub extra_volumes: ScalewayImageExtraVolumes,
26}
27
28#[derive(Deserialize, Debug)]
29pub struct ScalewayImageRootVolume {
30 pub id: String,
31 pub name: String,
32 pub size: u64,
33 pub volume_type: String,
34}
35
36#[derive(Deserialize, Debug)]
37pub struct ScalewayImageBootscript {
38 pub bootcmdargs: String,
39 pub default: bool,
40 pub dtb: String,
41 pub id: String,
42 pub initrd: String,
43 pub kernel: String,
44 pub organization: String,
45 pub project: String,
46 pub public: bool,
47 pub title: String,
48 pub arch: Option<String>,
49 pub zone: String,
50}
51
52#[derive(Deserialize, Debug)]
53pub struct ScalewayImageExtraVolumes {
54 #[serde(flatten)]
55 pub volumes: HashMap<String, ScalewayImageExtraVolume>,
56}
57
58#[derive(Deserialize, Debug)]
59pub struct ScalewayImageExtraVolume {
60 pub id: String,
61 pub name: String,
62 pub export_uri: Option<String>,
63 pub size: u64,
64 pub volume_type: String,
65 pub creation_date: String,
66 pub modification_date: String,
67 pub organization: String,
68 pub project: String,
69 pub tags: Vec<String>,
70 pub server: ScalewayImageExtraVolumeServer,
71 pub state: String,
72 pub zone: String,
73}
74
75#[derive(Deserialize, Debug)]
76pub struct ScalewayImageExtraVolumeServer {
77 pub id: String,
78 pub name: String,
79}