incus-client 0.1.1

Auto-generated Rust client for the Incus container and VM manager REST API
Documentation
/*
 * 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,
        }
    }
}