Skip to main content

hanzo_client/models/
score_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
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 ScoreView {
16    /// Comment is the grader's reasoning, truncated at 2000 characters.
17    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
18    pub comment: Option<String>,
19    /// DataType is NUMERIC, CATEGORICAL or BOOLEAN.
20    #[serde(rename = "dataType", skip_serializing_if = "Option::is_none")]
21    pub data_type: Option<String>,
22    /// ID is the score event's handle.
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<String>,
25    /// Name is the score name, which a rubric of the same name governs.
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28    /// RunName is the run this score was recorded under, when it came from one.
29    #[serde(rename = "runName", skip_serializing_if = "Option::is_none")]
30    pub run_name: Option<String>,
31    /// StringValue is the label of a CATEGORICAL score.
32    #[serde(rename = "stringValue", skip_serializing_if = "Option::is_none")]
33    pub string_value: Option<String>,
34    /// Timestamp is when the score was recorded.
35    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
36    pub timestamp: Option<String>,
37    /// TraceID is the model call this score grades, when it grades one.
38    #[serde(rename = "traceId", skip_serializing_if = "Option::is_none")]
39    pub trace_id: Option<String>,
40    /// Value is the numeric score; for BOOLEAN it is 0 or 1.
41    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
42    pub value: Option<f64>,
43}
44
45impl ScoreView {
46    pub fn new() -> ScoreView {
47        ScoreView {
48            comment: None,
49            data_type: None,
50            id: None,
51            name: None,
52            run_name: None,
53            string_value: None,
54            timestamp: None,
55            trace_id: None,
56            value: None,
57        }
58    }
59}
60