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 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,
        }
    }
}