windmill-api 1.796.0

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Documentation
/*
 * Windmill API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 1.796.0
 * Contact: contact@windmill.dev
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ExperimentScore : One scorer's headline for one run: the two numbers a column reports, over that run's cells.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ExperimentScore {
    #[serde(rename = "scorer_id")]
    pub scorer_id: String,
    /// What the column is called in the dataset that ran it, resolved server-side because a list of runs spanning datasets cannot hold every dataset's scorers to look it up. 
    #[serde(rename = "name")]
    pub name: String,
    #[serde(rename = "kind")]
    pub kind: Kind,
    #[serde(rename = "mean", skip_serializing_if = "Option::is_none")]
    pub mean: Option<f64>,
    /// The share of scored cells at or above the column's threshold, for a column that has one. Absent where the column has no threshold and the mean is the whole headline. 
    #[serde(rename = "pass_rate", skip_serializing_if = "Option::is_none")]
    pub pass_rate: Option<f64>,
    #[serde(rename = "scored")]
    pub scored: i32,
    /// How many of the run's cells the column failed on. A column that failed on all of them has no number to report and is still one of the columns that ran. 
    #[serde(rename = "failed")]
    pub failed: i32,
}

impl ExperimentScore {
    /// One scorer's headline for one run: the two numbers a column reports, over that run's cells.
    pub fn new(scorer_id: String, name: String, kind: Kind, scored: i32, failed: i32) -> ExperimentScore {
        ExperimentScore {
            scorer_id,
            name,
            kind,
            mean: None,
            pass_rate: None,
            scored,
            failed,
        }
    }
}
/// 
#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
pub enum Kind {
    #[serde(rename = "agent")]
    Agent,
    #[serde(rename = "script")]
    Script,
}

impl Default for Kind {
    fn default() -> Kind {
        Self::Agent
    }
}