ya_client_model/activity/
exe_script_command_result.rs

1/*
2 * Yagna Activity API
3 *
4 * It conforms with capability level 1 of the [Activity API specification](https://golem-network.gitbook.io/golem-internal-documentation-test/golem-activity-protocol/golem-activity-api).
5 *
6 * The version of the OpenAPI document: v1
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use chrono::{DateTime, Utc};
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
15#[serde(rename_all = "camelCase")]
16pub struct ExeScriptCommandResult {
17    pub index: u32,
18    pub result: CommandResult,
19    pub stdout: Option<CommandOutput>,
20    pub stderr: Option<CommandOutput>,
21    pub message: Option<String>,
22    pub is_batch_finished: bool,
23    pub event_date: DateTime<Utc>,
24}
25
26#[derive(Clone, Debug, Eq, PartialEq, Hash, Serialize, Deserialize)]
27#[serde(untagged)]
28pub enum CommandOutput {
29    Str(String),
30    Bin(Vec<u8>),
31}
32
33#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
34pub enum CommandResult {
35    Ok,
36    Error,
37}