1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* 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 StateGraph {
/// Initial is the state a fresh document starts in — \"draft\". A stored document with no status at all is read as this too.
#[serde(rename = "initial", skip_serializing_if = "Option::is_none")]
pub initial: Option<String>,
/// Live is the ONE state that is publicly readable — \"published\". The site pulls only documents in it, so reaching Live IS site-publish; every other state is invisible to a reader.
#[serde(rename = "live", skip_serializing_if = "Option::is_none")]
pub live: Option<String>,
/// States is every lifecycle state in canonical order: draft, in_review, approved, queued, published, archived. The console lays its board columns out in exactly this order, so the order is part of the answer.
#[serde(rename = "states", skip_serializing_if = "Option::is_none")]
pub states: Option<Vec<String>>,
/// Transitions maps each state to the states it may move to. A target absent from a state's list is REFUSED, at the endpoint and again at the storage boundary — this is the whole rule, not a hint for the UI. A state never lists itself; a move that changes nothing is always legal.
#[serde(rename = "transitions", skip_serializing_if = "Option::is_none")]
pub transitions: Option<std::collections::HashMap<String, Vec<String>>>,
}
impl StateGraph {
pub fn new() -> StateGraph {
StateGraph {
initial: None,
live: None,
states: None,
transitions: None,
}
}
}