1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* Hanzo Cloud API
*
* 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/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BuildSummary {
/// Agent is the label the surface that did the work calls itself by.
#[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
pub agent: Option<String>,
/// EndedAt is when it finished, same format. Empty means it is still going.
#[serde(rename = "endedAt", skip_serializing_if = "Option::is_none")]
pub ended_at: Option<String>,
/// Org and Project are the build's public ADDRESS — the pair the full story is read at, and the pair a visitor sees in the URL bar. Not a tenant key: this index is anonymous and lists only what authors published.
#[serde(rename = "org", skip_serializing_if = "Option::is_none")]
pub org: Option<String>,
/// Project is the product's slug, the second half of that address.
#[serde(rename = "project", skip_serializing_if = "Option::is_none")]
pub project: Option<String>,
/// Repo is the repository the work was done in, as the session reported it.
#[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
pub repo: Option<String>,
/// Session is the agent session behind the build, and the value its commits name in their `Hanzo-Session:` trailer.
#[serde(rename = "session", skip_serializing_if = "Option::is_none")]
pub session: Option<String>,
/// StartedAt is when the session opened, RFC 3339 in UTC.
#[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
pub started_at: Option<String>,
/// Status is the session's own: running, paused, done or error — so a card can show a build still being written.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Title is the human line for the card. Sent even when empty, like every field here, because that is what this route has always sent.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// Turns is HOW MANY turns the transcript holds — a COUNT, unlike the `turn` on each turn of the full story, which is that turn's position. The full read returns at most 1000 of them; this number is not capped.
#[serde(rename = "turns", skip_serializing_if = "Option::is_none")]
pub turns: Option<i32>,
}
impl BuildSummary {
pub fn new() -> BuildSummary {
BuildSummary {
agent: None,
ended_at: None,
org: None,
project: None,
repo: None,
session: None,
started_at: None,
status: None,
title: None,
turns: None,
}
}
}