proxmox_api/generated/nodes/node/
vncwebsocket.rs1pub struct VncwebsocketClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> VncwebsocketClient<T>
6where
7 T: crate::client::Client,
8{
9 pub fn new(client: T, parent_path: &str) -> Self {
10 Self {
11 client,
12 path: format!("{}{}", parent_path, "/vncwebsocket"),
13 }
14 }
15}
16impl<T> VncwebsocketClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Opens a websocket for VNC traffic."]
21 pub fn get(&self, params: GetParams) -> Result<GetOutput, T::Error> {
22 let path = self.path.to_string();
23 self.client.get(&path, ¶ms)
24 }
25}
26impl GetOutput {
27 pub fn new(port: String) -> Self {
28 Self {
29 port,
30 additional_properties: Default::default(),
31 }
32 }
33}
34#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
35pub struct GetOutput {
36 pub port: String,
37 #[serde(
38 flatten,
39 default,
40 skip_serializing_if = "::std::collections::HashMap::is_empty"
41 )]
42 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
43}
44impl GetParams {
45 pub fn new(port: u64, vncticket: String) -> Self {
46 Self {
47 port,
48 vncticket,
49 additional_properties: Default::default(),
50 }
51 }
52}
53#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
54pub struct GetParams {
55 #[serde(
56 serialize_with = "crate::types::serialize_int",
57 deserialize_with = "crate::types::deserialize_int"
58 )]
59 #[doc = "Port number returned by previous vncproxy call."]
60 pub port: u64,
61 #[doc = "Ticket from previous call to vncproxy."]
62 pub vncticket: String,
63 #[serde(
64 flatten,
65 default,
66 skip_serializing_if = "::std::collections::HashMap::is_empty"
67 )]
68 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
69}