hanzo_client/models/exec_request.rs
1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct ExecRequest {
16 /// Argv is the command as an argument vector, which is the honest form: it cannot be word-split by accident. Send this OR Command, not both.
17 #[serde(rename = "argv", skip_serializing_if = "Option::is_none")]
18 pub argv: Option<Vec<String>>,
19 /// Command is a shell line, for a caller that holds one. It is a convenience over Argv and is the only input that ever reaches a shell.
20 #[serde(rename = "command", skip_serializing_if = "Option::is_none")]
21 pub command: Option<String>,
22 /// Dir is the working directory to run in. Empty runs in the class's own workdir — /mnt/data for exec, /work for dev.
23 #[serde(rename = "dir", skip_serializing_if = "Option::is_none")]
24 pub dir: Option<String>,
25 /// ID is the sandbox to run in, from the path.
26 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
27 pub id: Option<String>,
28 /// Stdin is fed to the command on its standard input.
29 #[serde(rename = "stdin", skip_serializing_if = "Option::is_none")]
30 pub stdin: Option<String>,
31 /// TimeoutSec bounds the run in seconds. Zero takes the default.
32 #[serde(rename = "timeoutSec", skip_serializing_if = "Option::is_none")]
33 pub timeout_sec: Option<i32>,
34}
35
36impl ExecRequest {
37 pub fn new() -> ExecRequest {
38 ExecRequest {
39 argv: None,
40 command: None,
41 dir: None,
42 id: None,
43 stdin: None,
44 timeout_sec: None,
45 }
46 }
47}
48