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 PublishResult {
    /// Channels is the channel list read off the content document — integration ids or provider names, as the item declares them. Empty when the item names none, which targets every connected, enabled channel. It is what was ASKED for; Results is what happened.
    #[serde(rename = "channels", skip_serializing_if = "Option::is_none")]
    pub channels: Option<Vec<String>>,
    /// ExternalIDs maps channel id → the post id that channel returned, merged with everything earlier publishes recorded. Successes only, and it is the idempotency ledger: a channel named here is skipped by every later publish of this item, so the map only ever grows.
    #[serde(rename = "externalIds", skip_serializing_if = "Option::is_none")]
    pub external_ids: Option<std::collections::HashMap<String, String>>,
    /// Results is the outcome per channel — which went out, which did not and why — covering the whole fan-out including failures, so partial success is never flattened into one verdict. A channel the org has not connected appears here as failed with \"channel not connected\".
    #[serde(rename = "results", skip_serializing_if = "Option::is_none")]
    pub results: Option<Vec<models::ChannelResult>>,
    /// Status is the ONE headline, drawn from: \"distributed\" (something is on record and went out now), \"scheduled\" (same, handed to the channel's own scheduler for later), \"failed\" (nothing is on record — this fan-out missed entirely and no earlier one landed), \"in_progress\" (another publisher holds the item, so this call posted NOTHING and the caller retries), and \"not_configured\" (no distribution edge is wired; a transition records it instead of failing). A partial fan-out is \"distributed\"/\"scheduled\", never \"failed\" — the per-channel truth is in Results.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

impl PublishResult {
    pub fn new() -> PublishResult {
        PublishResult {
            channels: None,
            external_ids: None,
            results: None,
            status: None,
        }
    }
}