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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
/*
* Account API
*
* # Introduction The Account API allows you to manage projects. Project is Scaleway’s resource management feature. Designed to help you organize your infrastructure and cloud services, the feature allows resources to be isolated and grouped into specific projects.
*
* The version of the OpenAPI document: v2
*
* Generated by: https://openapi-generator.tech
*/
#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct CreatePoolRequest {
/// The name of the pool
#[serde(rename = "name")]
pub name: String,
/// The node type is the type of Scaleway Instance wanted for the pool. Nodes with insufficient memory are not eligible (DEV1-S, PLAY2-PICO, STARDUST). 'external' is a special node type used to provision instances from other cloud providers.
#[serde(rename = "node_type")]
pub node_type: String,
/// The placement group ID in which all the nodes of the pool will be created
#[serde(
rename = "placement_group_id",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub placement_group_id: Option<Option<String>>,
/// The enablement of the autoscaling feature for the pool
#[serde(rename = "autoscaling", skip_serializing_if = "Option::is_none")]
pub autoscaling: Option<bool>,
/// The size (number of nodes) of the pool
#[serde(rename = "size")]
pub size: i32,
/// The minimum size of the pool. Note that this field will be used only when autoscaling is enabled.
#[serde(
rename = "min_size",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub min_size: Option<Option<i32>>,
/// The maximum size of the pool. Note that this field will be used only when autoscaling is enabled.
#[serde(
rename = "max_size",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub max_size: Option<Option<i32>>,
/// The customization of the container runtime is available for each pool. Note that `docker` is deprecated since 1.20 and will be removed in 1.24.
#[serde(rename = "container_runtime", skip_serializing_if = "Option::is_none")]
pub container_runtime: Option<ContainerRuntime>,
/// The enablement of the autohealing feature for the pool
#[serde(rename = "autohealing", skip_serializing_if = "Option::is_none")]
pub autohealing: Option<bool>,
/// The tags associated with the pool
#[serde(rename = "tags", skip_serializing_if = "Option::is_none")]
pub tags: Option<Vec<String>>,
#[serde(rename = "kubelet_args", skip_serializing_if = "Option::is_none")]
pub kubelet_args: Option<crate::models::CreatePoolRequestKubeletArgs>,
#[serde(rename = "upgrade_policy", skip_serializing_if = "Option::is_none")]
pub upgrade_policy: Option<Box<crate::models::CreatePoolRequestUpgradePolicy>>,
/// The Zone in which the Pool's node will be spawn in
#[serde(rename = "zone", skip_serializing_if = "Option::is_none")]
pub zone: Option<String>,
/// The system volume disk type, we provide two different types of volume (`volume_type`): - `l_ssd` is a local block storage: your system is stored locally on the hypervisor of your node. - `b_ssd` is a remote block storage: your system is stored on a centralised and resilient cluster.
#[serde(rename = "root_volume_type", skip_serializing_if = "Option::is_none")]
pub root_volume_type: Option<RootVolumeType>,
/// The system volume disk size (in bytes)
#[serde(
rename = "root_volume_size",
default,
with = "::serde_with::rust::double_option",
skip_serializing_if = "Option::is_none"
)]
pub root_volume_size: Option<Option<i32>>,
}
impl CreatePoolRequest {
pub fn new(name: String, node_type: String, size: i32) -> CreatePoolRequest {
CreatePoolRequest {
name,
node_type,
placement_group_id: None,
autoscaling: None,
size,
min_size: None,
max_size: None,
container_runtime: None,
autohealing: None,
tags: None,
kubelet_args: None,
upgrade_policy: None,
zone: None,
root_volume_type: None,
root_volume_size: None,
}
}
}
/// The customization of the container runtime is available for each pool. Note that `docker` is deprecated since 1.20 and will be removed in 1.24.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum ContainerRuntime {
#[serde(rename = "unknown_runtime")]
UnknownRuntime,
#[serde(rename = "docker")]
Docker,
#[serde(rename = "containerd")]
Containerd,
#[serde(rename = "crio")]
Crio,
}
impl Default for ContainerRuntime {
fn default() -> ContainerRuntime {
Self::UnknownRuntime
}
}
/// The system volume disk type, we provide two different types of volume (`volume_type`): - `l_ssd` is a local block storage: your system is stored locally on the hypervisor of your node. - `b_ssd` is a remote block storage: your system is stored on a centralised and resilient cluster.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum RootVolumeType {
#[serde(rename = "default_volume_type")]
DefaultVolumeType,
#[serde(rename = "l_ssd")]
LSsd,
#[serde(rename = "b_ssd")]
BSsd,
}
impl Default for RootVolumeType {
fn default() -> RootVolumeType {
Self::DefaultVolumeType
}
}