Skip to main content

hanzo_client/models/
build_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 BuildView {
16    /// Agent is the label the surface that did the work calls itself by.
17    #[serde(rename = "agent", skip_serializing_if = "Option::is_none")]
18    pub agent: Option<String>,
19    /// EndedAt is when it finished, same format. Empty means it has not — the build is still going.
20    #[serde(rename = "endedAt", skip_serializing_if = "Option::is_none")]
21    pub ended_at: Option<String>,
22    /// 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.
23    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
24    pub model: Option<String>,
25    /// 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.
26    #[serde(rename = "org", skip_serializing_if = "Option::is_none")]
27    pub org: Option<String>,
28    /// Project is the product's slug, the other half of that address.
29    #[serde(rename = "project", skip_serializing_if = "Option::is_none")]
30    pub project: Option<String>,
31    /// Repo is the repository the work was done in, as the session reported it.
32    #[serde(rename = "repo", skip_serializing_if = "Option::is_none")]
33    pub repo: Option<String>,
34    /// 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.
35    #[serde(rename = "session", skip_serializing_if = "Option::is_none")]
36    pub session: Option<String>,
37    /// StartedAt is when the session opened, RFC 3339 in UTC.
38    #[serde(rename = "startedAt", skip_serializing_if = "Option::is_none")]
39    pub started_at: Option<String>,
40    /// 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.
41    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
42    pub status: Option<String>,
43    /// Title is the human line the session was opened or renamed with. Empty when nobody gave it one.
44    #[serde(rename = "title", skip_serializing_if = "Option::is_none")]
45    pub title: Option<String>,
46    /// Turns is the whole transcript, oldest first, capped at 1000: a published build is a story to read down, not an archive to page.
47    #[serde(rename = "turns", skip_serializing_if = "Option::is_none")]
48    pub turns: Option<Vec<models::BuildTurn>>,
49    /// Verify is the exact command that re-derives every commit binding below straight from git, so nothing here has to be taken on trust.
50    #[serde(rename = "verify", skip_serializing_if = "Option::is_none")]
51    pub verify: Option<String>,
52}
53
54impl BuildView {
55    pub fn new() -> BuildView {
56        BuildView {
57            agent: None,
58            ended_at: None,
59            model: None,
60            org: None,
61            project: None,
62            repo: None,
63            session: None,
64            started_at: None,
65            status: None,
66            title: None,
67            turns: None,
68            verify: None,
69        }
70    }
71}
72