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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Incus external REST API
*
* This is the REST API used by all Incus clients. Internal endpoints aren't included in this documentation. The Incus API is available over both a local unix+http and remote https API. Authentication for local users relies on group membership and access to the unix socket. For remote users, the default authentication method is TLS client certificates.
*
* The version of the OpenAPI document: 1.0
* Contact: lxc-devel@lists.linuxcontainers.org
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InstanceExecPost {
/// Command and its arguments
#[serde(rename = "command", skip_serializing_if = "Option::is_none")]
pub command: Option<Vec<String>>,
/// Current working directory for the command
#[serde(rename = "cwd", skip_serializing_if = "Option::is_none")]
pub cwd: Option<String>,
/// Additional environment to pass to the command
#[serde(rename = "environment", skip_serializing_if = "Option::is_none")]
pub environment: Option<std::collections::HashMap<String, String>>,
/// GID of the user to spawn the command as
#[serde(rename = "group", skip_serializing_if = "Option::is_none")]
pub group: Option<i32>,
/// Terminal height in rows (for interactive)
#[serde(rename = "height", skip_serializing_if = "Option::is_none")]
pub height: Option<i64>,
/// Whether the command is to be spawned in interactive mode (singled PTY instead of 3 PIPEs)
#[serde(rename = "interactive", skip_serializing_if = "Option::is_none")]
pub interactive: Option<bool>,
/// Whether to capture the output for later download (requires non-interactive)
#[serde(rename = "record-output", skip_serializing_if = "Option::is_none")]
pub record_output: Option<bool>,
/// UID of the user to spawn the command as
#[serde(rename = "user", skip_serializing_if = "Option::is_none")]
pub user: Option<i32>,
/// Whether to wait for all websockets to be connected before spawning the command
#[serde(rename = "wait-for-websocket", skip_serializing_if = "Option::is_none")]
pub wait_for_websocket: Option<bool>,
/// Terminal width in characters (for interactive)
#[serde(rename = "width", skip_serializing_if = "Option::is_none")]
pub width: Option<i64>,
}
impl InstanceExecPost {
pub fn new() -> InstanceExecPost {
InstanceExecPost {
command: None,
cwd: None,
environment: None,
group: None,
height: None,
interactive: None,
record_output: None,
user: None,
wait_for_websocket: None,
width: None,
}
}
}