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 TransitionResult {
    /// Distribution is the channel fan-out this move triggered. Present ONLY on the move to published, the single edge that distributes — so its absence means no fan-out was attempted, never that one failed quietly. A fan-out that DID fail is present carrying its own honest status, because distribution never rolls the status change back.
    #[serde(rename = "distribution", skip_serializing_if = "Option::is_none")]
    pub distribution: Option<Box<models::PublishResult>>,
    /// DocType is the content type that moved — Campaign, SocialPost or Asset — echoed from the path.
    #[serde(rename = "doctype", skip_serializing_if = "Option::is_none")]
    pub doctype: Option<String>,
    /// From is the state the item held when it was read. A document carrying no status yet reads as \"draft\".
    #[serde(rename = "from", skip_serializing_if = "Option::is_none")]
    pub from: Option<String>,
    /// Name is the document that moved, echoed from the path.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Storefront is the catalog side effect, present only when a published Asset was product imagery — it carries a design and a kind of ecom, product or lifestyle. Absent for everything else, so absence reads as \"not catalog imagery\" rather than \"the catalog failed\".
    #[serde(rename = "storefront", skip_serializing_if = "Option::is_none")]
    pub storefront: Option<Box<models::StorefrontResult>>,
    /// To is the state it holds now. From == To on an idempotent re-transition, which is legal and is where a caller that lost a publish race lands.
    #[serde(rename = "to", skip_serializing_if = "Option::is_none")]
    pub to: Option<String>,
}

impl TransitionResult {
    pub fn new() -> TransitionResult {
        TransitionResult {
            distribution: None,
            doctype: None,
            from: None,
            name: None,
            storefront: None,
            to: None,
        }
    }
}