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
/*
* Hetzner Cloud API
*
* Copied from the official API documentation for the Public Hetzner Cloud.
*
* The version of the OpenAPI document: 0.28.0
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
/// EnableRescueModeForServerRequest : Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/enable_rescue
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct EnableRescueModeForServerRequest {
/// Array of SSH key IDs which should be injected into the rescue system.
#[serde(rename = "ssh_keys", skip_serializing_if = "Option::is_none")]
pub ssh_keys: Option<Vec<i64>>,
/// Type of rescue system to boot.
#[serde(rename = "type", skip_serializing_if = "Option::is_none")]
pub r#type: Option<Type>,
}
impl EnableRescueModeForServerRequest {
/// Request for POST https://api.hetzner.cloud/v1/servers/{id}/actions/enable_rescue
pub fn new() -> EnableRescueModeForServerRequest {
EnableRescueModeForServerRequest {
ssh_keys: None,
r#type: None,
}
}
}
/// Type of rescue system to boot.
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Type {
#[serde(rename = "linux64")]
Linux64,
}
impl Default for Type {
fn default() -> Type {
Self::Linux64
}
}