Skip to main content

hanzo_client/models/
session_progress.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 SessionProgress {
16    /// Activity is the one line saying what the run is doing right now (\"running the reaper's tests\"), up to 120 characters, in the model's words. Empty when nothing has estimated it yet.
17    #[serde(rename = "activity", skip_serializing_if = "Option::is_none")]
18    pub activity: Option<String>,
19    /// At is when this was determined, RFC 3339 in UTC to the second. Read it as the estimate's AGE: an estimate is not refreshed while nothing has happened, and a stale one beside a run that is still moving is itself worth seeing. Empty when nothing has estimated it yet.
20    #[serde(rename = "at", skip_serializing_if = "Option::is_none")]
21    pub at: Option<String>,
22    /// Estimated says a MODEL produced this, from the run's transcript, and it may be wrong. False means the session's own row said it: a finished run is 100% because it finished, not because anything guessed. Never treat a true here as a measurement — it is the reason to look, not the answer.
23    #[serde(rename = "estimated", skip_serializing_if = "Option::is_none")]
24    pub estimated: Option<bool>,
25    /// Pct is how much of the run is done, 0 to 100. THE KEY IS ABSENT when progress is indeterminate — a run nobody can estimate is not a run that has done nothing, and rendering the second for the first is the mistake this omission exists to make impossible. Read `phase` before reaching for it.
26    #[serde(rename = "pct", skip_serializing_if = "Option::is_none")]
27    pub pct: Option<i32>,
28    /// Phase is what shape the run is in: running, blocked, done, error, or unknown when nothing has estimated it yet. blocked means the transcript shows the run waiting on something — an approval, a credential, an answer — which is the one state the running surface cannot report about itself. error only ever comes from the session's own terminal status.
29    #[serde(rename = "phase", skip_serializing_if = "Option::is_none")]
30    pub phase: Option<String>,
31}
32
33impl SessionProgress {
34    pub fn new() -> SessionProgress {
35        SessionProgress {
36            activity: None,
37            at: None,
38            estimated: None,
39            pct: None,
40            phase: None,
41        }
42    }
43}
44