scaleway_api_rs/models/
install_server_request.rs1#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
12pub struct InstallServerRequest {
13 #[serde(rename = "os_id")]
15 pub os_id: String,
16 #[serde(rename = "hostname")]
18 pub hostname: String,
19 #[serde(rename = "ssh_key_ids")]
21 pub ssh_key_ids: Vec<String>,
22 #[serde(
24 rename = "user",
25 default,
26 with = "::serde_with::rust::double_option",
27 skip_serializing_if = "Option::is_none"
28 )]
29 pub user: Option<Option<String>>,
30 #[serde(
32 rename = "password",
33 default,
34 with = "::serde_with::rust::double_option",
35 skip_serializing_if = "Option::is_none"
36 )]
37 pub password: Option<Option<String>>,
38 #[serde(
40 rename = "service_user",
41 default,
42 with = "::serde_with::rust::double_option",
43 skip_serializing_if = "Option::is_none"
44 )]
45 pub service_user: Option<Option<String>>,
46 #[serde(
48 rename = "service_password",
49 default,
50 with = "::serde_with::rust::double_option",
51 skip_serializing_if = "Option::is_none"
52 )]
53 pub service_password: Option<Option<String>>,
54}
55
56impl InstallServerRequest {
57 pub fn new(os_id: String, hostname: String, ssh_key_ids: Vec<String>) -> InstallServerRequest {
58 InstallServerRequest {
59 os_id,
60 hostname,
61 ssh_key_ids,
62 user: None,
63 password: None,
64 service_user: None,
65 service_password: None,
66 }
67 }
68}