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 RiskSearchReport {
    /// Done is false while the run is still going; the trials below are then the ones finished so far.
    #[serde(rename = "done", skip_serializing_if = "Option::is_none")]
    pub done: Option<bool>,
    /// Ended is when it finished, RFC 3339. Absent while it is still going.
    #[serde(rename = "ended", skip_serializing_if = "Option::is_none")]
    pub ended: Option<String>,
    /// Events is how much of this organisation's history was replayed.
    #[serde(rename = "events", skip_serializing_if = "Option::is_none")]
    pub events: Option<i32>,
    /// Fitted is the winning shape FITTED over your own history and published as one of your organisation's own model values. Name its address on PUT /v1/risk/state/model and the winning shape becomes the model you are running.  It is why this op answers something you can act on. A trial keeps counts and not the model that produced them, so a report without this named a shape nobody could install — and the adoption path refused a shape change besides. Fitting the winner once is a sixty-fifth pass over the same history; keeping all sixty-four fitted models resident instead would cost a measured 21 MiB per run for sixty-three shapes nobody adopts.  Two things about it are worth knowing before you adopt it. Its realised rate can differ from the winner's above, because the ranking measures every candidate under one fixed reference geometry so the comparison is a comparison, while this is fitted under YOUR geometry — the one an outsider cannot predict. And it has learned the window this search replayed and nothing older, so adopting it trades history for fit.
    #[serde(rename = "fitted", skip_serializing_if = "Option::is_none")]
    pub fitted: Option<Box<models::RiskModelValue>>,
    /// Gap says why the winning shape could not be fitted into an adoptable value, when it could not. It is separate from Refusal because they are different facts: a refusal means the ranking below proves nothing, a gap means the ranking stands and only the value is missing.
    #[serde(rename = "gap", skip_serializing_if = "Option::is_none")]
    pub gap: Option<String>,
    /// ID is the run.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Refusal says why the run proves nothing, when it does. An empty history is REFUSED rather than reported as zero alerts: \"no alerts\" is exactly what a quiet model looks like, and choosing a shape on the strength of an empty replay is the failure a sandbox exists to prevent.
    #[serde(rename = "refusal", skip_serializing_if = "Option::is_none")]
    pub refusal: Option<String>,
    /// Started is when the run was accepted, RFC 3339.
    #[serde(rename = "started", skip_serializing_if = "Option::is_none")]
    pub started: Option<String>,
    /// Trials is every shape tried, best first.
    #[serde(rename = "trials", skip_serializing_if = "Option::is_none")]
    pub trials: Option<Vec<models::RiskTrial>>,
    /// Winner is the best-fitting shape, absent when nothing fit.
    #[serde(rename = "winner", skip_serializing_if = "Option::is_none")]
    pub winner: Option<Box<models::RiskTrial>>,
}

impl RiskSearchReport {
    pub fn new() -> RiskSearchReport {
        RiskSearchReport {
            done: None,
            ended: None,
            events: None,
            fitted: None,
            gap: None,
            id: None,
            refusal: None,
            started: None,
            trials: None,
            winner: None,
        }
    }
}