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