Skip to main content

hanzo_client/models/
event_in.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 EventIn {
16    /// Actor is who produced the turn. Empty takes the validated caller, which is what an agent writing its own transcript wants; naming one is for a surface recording on somebody else's behalf.
17    #[serde(rename = "actor", skip_serializing_if = "Option::is_none")]
18    pub actor: Option<String>,
19    /// ID is the session to append to, from the path.
20    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21    pub id: Option<String>,
22    /// Kind is what this turn IS: message, tool-call, spawn, log, status, control or progress. Anything else is refused — the vocabulary is closed so a reader can branch on it.
23    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
24    pub kind: Option<String>,
25    #[serde(rename = "payload", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
26    pub payload: Option<Option<serde_json::Value>>,
27}
28
29impl EventIn {
30    pub fn new() -> EventIn {
31        EventIn {
32            actor: None,
33            id: None,
34            kind: None,
35            payload: None,
36        }
37    }
38}
39