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 ReconcileReport {
    /// Declared is how many objects the rendered source declares — the denominator the three outcome counts below are read against. Zero means the render produced nothing, which trips the prune fuse rather than sweeping the fleet.
    #[serde(rename = "declared", skip_serializing_if = "Option::is_none")]
    pub declared: Option<i32>,
    /// Failed is how many objects the apply could not reconcile. Non-zero is a PARTIAL run reported at 200: the engine applied what it could and each failure names itself in Results, so a caller reads this number rather than the status code to learn whether the fleet matches the source.
    #[serde(rename = "failed", skip_serializing_if = "Option::is_none")]
    pub failed: Option<i32>,
    /// Instance is the tracking id this run stamps on everything it manages, so a later run can tell the objects it owns from objects another instance declares. DEPLOY_ENGINE_INSTANCE names it; the default is `universe`.
    #[serde(rename = "instance", skip_serializing_if = "Option::is_none")]
    pub instance: Option<String>,
    /// Prune reports whether DELETION was enabled for this run. False means an object the source no longer declares was left alone rather than removed, so a zero Pruned below means \"nothing to delete\" only when this is true.
    #[serde(rename = "prune", skip_serializing_if = "Option::is_none")]
    pub prune: Option<bool>,
    /// Pruned is how many live objects this run DELETED because the source no longer declares them. Always 0 when Prune is false.
    #[serde(rename = "pruned", skip_serializing_if = "Option::is_none")]
    pub pruned: Option<i32>,
    /// Results is one entry per object the run acted on, in the order the engine applied them. Empty (never null) when the run reconciled nothing.
    #[serde(rename = "results", skip_serializing_if = "Option::is_none")]
    pub results: Option<Vec<models::AppliedResource>>,
    /// Revision is the source commit this run applied, as the source resolved it — a git commit SHA, not an image tag. It is what an operator cites when asking what the cluster was last made to match.
    #[serde(rename = "revision", skip_serializing_if = "Option::is_none")]
    pub revision: Option<String>,
    /// Source is the git coordinate the run rendered. It is this deployment's own configuration echoed back, never a request parameter, and it is reported so a reader of the answer knows WHICH tree the revision names.
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<Box<models::ReconcileSource>>,
    /// Synced is how many objects the run applied successfully.
    #[serde(rename = "synced", skip_serializing_if = "Option::is_none")]
    pub synced: Option<i32>,
}

impl ReconcileReport {
    pub fn new() -> ReconcileReport {
        ReconcileReport {
            declared: None,
            failed: None,
            instance: None,
            prune: None,
            pruned: None,
            results: None,
            revision: None,
            source: None,
            synced: None,
        }
    }
}