Skip to main content

hanzo_client/models/
control_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 ControlResult {
16    /// Command is the verb that was recorded: pause, resume, stop or message.
17    #[serde(rename = "command", skip_serializing_if = "Option::is_none")]
18    pub command: Option<String>,
19    /// Event is the durable control event the command became. The intent is recorded whether or not it reached an engine, which is what makes a stream-consuming surface able to act on it.
20    #[serde(rename = "event", skip_serializing_if = "Option::is_none")]
21    pub event: Option<Box<models::EventView>>,
22    /// Forwarded is whether the command also reached the durable-execution engine. FALSE IS NOT A FAILURE: a session with no workflow link, or a deployment with no tasks backend, is record-only by design. A forward that was attempted and failed is a 502, never a false here.
23    #[serde(rename = "forwarded", skip_serializing_if = "Option::is_none")]
24    pub forwarded: Option<bool>,
25}
26
27impl ControlResult {
28    pub fn new() -> ControlResult {
29        ControlResult {
30            command: None,
31            event: None,
32            forwarded: None,
33        }
34    }
35}
36