hanzo_client/models/activity_view.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 ActivityView {
16 /// agent name
17 #[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
18 pub agent: Option<String>,
19 /// RFC3339 UTC
20 #[serde(rename = "at", skip_serializing_if = "Option::is_none")]
21 pub at: Option<String>,
22 /// ID identifies the event, and its shape says which kind it is: a run event carries the run's own id, while an agent event is the agent id suffixed \":created\" or \":updated\". Unique within a feed, and not an address — there is nothing to fetch it by.
23 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24 pub id: Option<String>,
25 /// invoked|failed|created|updated (from real events)
26 #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
27 pub kind: Option<String>,
28 /// Message is the line to render, already bounded: \"Invoked <model>\" for a run that worked, the run's own error truncated to 200 characters for one that did not (or \"Run failed\" when it said nothing), and a fixed phrase for the two agent events. Nothing here is invented — every event is a row that exists.
29 #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
30 pub message: Option<String>,
31}
32
33impl ActivityView {
34 pub fn new() -> ActivityView {
35 ActivityView {
36 agent: None,
37 at: None,
38 id: None,
39 kind: None,
40 message: None,
41 }
42 }
43}
44