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
65
66
67
68
69
70
71
72
/*
* 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 BuildView {
/// 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 has not — the build is still going.
#[serde(rename = "endedAt", skip_serializing_if = "Option::is_none")]
pub ended_at: Option<String>,
/// Model is the model that did the work, taken from the FIRST turn whose body names one — a transcript states it, this route does not resolve it. Empty when no turn said.
#[serde(rename = "model", skip_serializing_if = "Option::is_none")]
pub model: Option<String>,
/// Org is the org that published this build, echoed from the URL. It is part of the build's public ADDRESS and not a tenant key — this route is anonymous, and the only rows it can reach are ones an author explicitly published.
#[serde(rename = "org", skip_serializing_if = "Option::is_none")]
pub org: Option<String>,
/// Project is the product's slug, the other 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 id of the agent session this story IS — the same value a produced commit carries in its `Hanzo-Session:` trailer, which is what ties the repository's history to this page.
#[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. A build can be read while it is still being written, so this is not always terminal — and an `error` build is still a readable story, not a missing page.
#[serde(rename = "status", skip_serializing_if = "Option::is_none")]
pub status: Option<String>,
/// Title is the human line the session was opened or renamed with. Empty when nobody gave it one.
#[serde(rename = "title", skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
/// Turns is the whole transcript, oldest first, capped at 1000: a published build is a story to read down, not an archive to page.
#[serde(rename = "turns", skip_serializing_if = "Option::is_none")]
pub turns: Option<Vec<models::BuildTurn>>,
/// Verify is the exact command that re-derives every commit binding below straight from git, so nothing here has to be taken on trust.
#[serde(rename = "verify", skip_serializing_if = "Option::is_none")]
pub verify: Option<String>,
}
impl BuildView {
pub fn new() -> BuildView {
BuildView {
agent: None,
ended_at: None,
model: None,
org: None,
project: None,
repo: None,
session: None,
started_at: None,
status: None,
title: None,
turns: None,
verify: None,
}
}
}