Skip to main content

hanzo_client/models/
exec_result.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 ExecResult {
16    /// ExitCode is the command's own exit status. A non-zero one is a SUCCESSFUL call carrying a failed command — the HTTP status stays 200, because \"the command failed\" and \"the call failed\" are different facts and a caller has to be able to tell them apart.
17    #[serde(rename = "exitCode", skip_serializing_if = "Option::is_none")]
18    pub exit_code: Option<i32>,
19    /// Stderr is everything it wrote to standard error. It is populated on a successful run too — plenty of tools report progress there — so it is not a signal that anything went wrong; ExitCode is.
20    #[serde(rename = "stderr", skip_serializing_if = "Option::is_none")]
21    pub stderr: Option<String>,
22    /// Stdout is everything the command wrote to standard output, as text.
23    #[serde(rename = "stdout", skip_serializing_if = "Option::is_none")]
24    pub stdout: Option<String>,
25}
26
27impl ExecResult {
28    pub fn new() -> ExecResult {
29        ExecResult {
30            exit_code: None,
31            stderr: None,
32            stdout: None,
33        }
34    }
35}
36