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 ReportRunIn {
    /// Branch, CommitSha and Diffstat describe what the run produced; Error is the failure when OK is false. Each is clamped, never rejected.
    #[serde(rename = "branch", skip_serializing_if = "Option::is_none")]
    pub branch: Option<String>,
    /// Changed says whether the run produced any commit. It is INDEPENDENT of OK: a run can succeed and change nothing (there was nothing to do), and a run can fail after committing some of its work. Two questions, two booleans.
    #[serde(rename = "changed", skip_serializing_if = "Option::is_none")]
    pub changed: Option<bool>,
    /// CommitSha is the tip the run pushed, clamped to 128 characters. Empty when it pushed nothing, which is the same case Changed reports false for.
    #[serde(rename = "commitSha", skip_serializing_if = "Option::is_none")]
    pub commit_sha: Option<String>,
    /// Diffstat is the run's own summary of what it changed, as text, clamped to 64 KiB. Free-form: it is shown, never parsed.
    #[serde(rename = "diffstat", skip_serializing_if = "Option::is_none")]
    pub diffstat: Option<String>,
    /// Error is why the run failed, clamped to 64 KiB. It is CLAMPED rather than refused — a truncated reason is worth more than a rejected report, because a rejected report leaves the durable workflow waiting forever.
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<String>,
    /// ID is the machine reporting, from the path.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// OK is whether the run succeeded; Changed whether it produced any commit.
    #[serde(rename = "ok", skip_serializing_if = "Option::is_none")]
    pub ok: Option<bool>,
    /// RunID is the routed run being completed, from the path.
    #[serde(rename = "runId", skip_serializing_if = "Option::is_none")]
    pub run_id: Option<String>,
}

impl ReportRunIn {
    pub fn new() -> ReportRunIn {
        ReportRunIn {
            branch: None,
            changed: None,
            commit_sha: None,
            diffstat: None,
            error: None,
            id: None,
            ok: None,
            run_id: None,
        }
    }
}