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 #[serde(default)]
22 pub tags: Vec<String>,
23 pub zone: String,
24 pub root_volume: ScalewayImageRootVolume,
25 pub default_bootscript: Option<ScalewayImageBootscript>,
26 pub extra_volumes: ScalewayImageExtraVolumes,
27}
28
29#[derive(Deserialize, Debug)]
30pub struct ScalewayImageRootVolume {
31 pub id: String,
32 pub name: String,
33 pub size: u64,
34 pub volume_type: String,
35}
36
37#[derive(Deserialize, Debug)]
38pub struct ScalewayImageBootscript {
39 pub bootcmdargs: String,
40 pub default: bool,
41 pub dtb: String,
42 pub id: String,
43 pub initrd: String,
44 pub kernel: String,
45 pub organization: String,
46 pub project: String,
47 pub public: bool,
48 pub title: String,
49 pub arch: Option<String>,
50 pub zone: String,
51}
52
53#[derive(Deserialize, Debug)]
54pub struct ScalewayImageExtraVolumes {
55 #[serde(flatten)]
56 pub volumes: HashMap<String, ScalewayImageExtraVolume>,
57}
58
59#[derive(Deserialize, Debug)]
60pub struct ScalewayImageExtraVolume {
61 pub id: String,
62 pub name: Option<String>,
63 pub export_uri: Option<String>,
64 pub size: Option<u64>,
65 pub volume_type: String,
66 pub creation_date: Option<String>,
67 pub modification_date: Option<String>,
68 pub organization: Option<String>,
69 pub project: Option<String>,
70 #[serde(default)]
71 pub tags: Vec<String>,
72 pub server: Option<ScalewayImageExtraVolumeServer>,
73 pub state: String,
74 pub zone: String,
75}
76
77#[derive(Deserialize, Debug)]
78pub struct ScalewayImageExtraVolumeServer {
79 pub id: String,
80 pub name: String,
81}