hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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,
        }
    }
}