hanzo_client/models/progress_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 ProgressView {
16 /// Done counts steps that are FINISHED — done and skipped alike, since a step the org deliberately passed over is not still owed. It therefore rises when somebody skips, which is the intended reading of a checklist.
17 #[serde(rename = "done", skip_serializing_if = "Option::is_none")]
18 pub done: Option<i32>,
19 /// Next is the id of the step to do next: the first available, unfinished step in authoring order. Empty when the journey is complete, and also empty when every remaining step is blocked by a dependency.
20 #[serde(rename = "next", skip_serializing_if = "Option::is_none")]
21 pub next: Option<String>,
22 /// Percent is done/total as a whole number 0-100, rounded, so a caller renders a bar without recomputing it. Total zero reads as 0.
23 #[serde(rename = "percent", skip_serializing_if = "Option::is_none")]
24 pub percent: Option<i32>,
25 /// Total is how many steps this org's journey holds — the ENABLED steps of the playbook, so it shrinks when an operator disables one and does not match the authored step count.
26 #[serde(rename = "total", skip_serializing_if = "Option::is_none")]
27 pub total: Option<i32>,
28}
29
30impl ProgressView {
31 pub fn new() -> ProgressView {
32 ProgressView {
33 done: None,
34 next: None,
35 percent: None,
36 total: None,
37 }
38 }
39}
40