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
/*
* 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};
/// RequestConsoleForServerResponse : Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/request_console
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RequestConsoleForServerResponse {
#[serde(rename = "action")]
pub action: Box<models::Action>,
/// VNC password to use for this connection (this password only works in combination with a wss_url with valid token).
#[serde(rename = "password")]
pub password: String,
/// URL of websocket proxy to use; this includes a token which is valid for a limited time only.
#[serde(rename = "wss_url")]
pub wss_url: String,
}
impl RequestConsoleForServerResponse {
/// Response to POST https://api.hetzner.cloud/v1/servers/{id}/actions/request_console
pub fn new(
action: models::Action,
password: String,
wss_url: String,
) -> RequestConsoleForServerResponse {
RequestConsoleForServerResponse {
action: Box::new(action),
password,
wss_url,
}
}
}