proxmox_api/generated/nodes/node/qemu/vmid/
mtunnelwebsocket.rs1pub struct MtunnelwebsocketClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> MtunnelwebsocketClient<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, "/mtunnelwebsocket"),
13 }
14 }
15}
16impl<T> MtunnelwebsocketClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Migration tunnel endpoint for websocket upgrade - only for internal use by VM migration."]
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}
26#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize, Default)]
27pub struct GetOutput {
28 #[serde(skip_serializing_if = "Option::is_none", default)]
29 pub port: Option<String>,
30 #[serde(skip_serializing_if = "Option::is_none", default)]
31 pub socket: Option<String>,
32 #[serde(
33 flatten,
34 default,
35 skip_serializing_if = "::std::collections::HashMap::is_empty"
36 )]
37 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
38}
39impl GetParams {
40 pub fn new(socket: String, ticket: String) -> Self {
41 Self {
42 socket,
43 ticket,
44 additional_properties: Default::default(),
45 }
46 }
47}
48#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
49pub struct GetParams {
50 #[doc = "unix socket to forward to"]
51 pub socket: String,
52 #[doc = "ticket return by initial 'mtunnel' API call, or retrieved via 'ticket' tunnel command"]
53 pub ticket: String,
54 #[serde(
55 flatten,
56 default,
57 skip_serializing_if = "::std::collections::HashMap::is_empty"
58 )]
59 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
60}