Skip to main content

windmill_api/models/
recent_scorers_200_response_inner.rs

1/*
2 * Windmill API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: 1.796.0
7 * Contact: contact@windmill.dev
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RecentScorers200ResponseInner {
16    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
17    pub id: Option<String>,
18    /// Column header. Defaults to the last segment of the path.
19    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
20    pub name: Option<String>,
21    /// A score at or above this counts as a pass, and the column reports a pass rate beside its mean. Applied when results are read rather than when they are produced, so moving the line re-reads every score already recorded instead of invalidating them. 
22    #[serde(rename = "pass_if", skip_serializing_if = "Option::is_none")]
23    pub pass_if: Option<f64>,
24    #[serde(rename = "kind")]
25    pub kind: Kind,
26    /// The script, or the ai_agent resource used as a judge.
27    #[serde(rename = "path")]
28    pub path: String,
29    /// The dataset it is a column of.
30    #[serde(rename = "dataset")]
31    pub dataset: String,
32}
33
34impl RecentScorers200ResponseInner {
35    pub fn new(kind: Kind, path: String, dataset: String) -> RecentScorers200ResponseInner {
36        RecentScorers200ResponseInner {
37            id: None,
38            name: None,
39            pass_if: None,
40            kind,
41            path,
42            dataset,
43        }
44    }
45}
46/// 
47#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
48pub enum Kind {
49    #[serde(rename = "script")]
50    Script,
51    #[serde(rename = "agent")]
52    Agent,
53}
54
55impl Default for Kind {
56    fn default() -> Kind {
57        Self::Script
58    }
59}
60