proxmox_api/generated/nodes/node/qemu/vmid/
sendkey.rs1pub struct SendkeyClient<T> {
2 client: T,
3 path: String,
4}
5impl<T> SendkeyClient<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, "/sendkey"),
13 }
14 }
15}
16impl<T> SendkeyClient<T>
17where
18 T: crate::client::Client,
19{
20 #[doc = "Send key event to virtual machine."]
21 pub fn put(&self, params: PutParams) -> Result<(), T::Error> {
22 let path = self.path.to_string();
23 self.client.put(&path, ¶ms)
24 }
25}
26impl PutParams {
27 pub fn new(key: String) -> Self {
28 Self {
29 key,
30 skiplock: Default::default(),
31 additional_properties: Default::default(),
32 }
33 }
34}
35#[derive(Clone, Debug, :: serde :: Serialize, :: serde :: Deserialize)]
36pub struct PutParams {
37 #[doc = "The key (qemu monitor encoding)."]
38 pub key: String,
39 #[serde(
40 serialize_with = "crate::types::serialize_bool_optional",
41 deserialize_with = "crate::types::deserialize_bool_optional"
42 )]
43 #[serde(skip_serializing_if = "Option::is_none", default)]
44 #[doc = "Ignore locks - only root is allowed to use this option."]
45 pub skiplock: Option<bool>,
46 #[serde(
47 flatten,
48 default,
49 skip_serializing_if = "::std::collections::HashMap::is_empty"
50 )]
51 pub additional_properties: ::std::collections::HashMap<String, ::serde_json::Value>,
52}