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 ScoreReq {
    /// Comment is the grader's reasoning, truncated at 2000 characters.
    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
    pub comment: Option<String>,
    /// DataType is NUMERIC, CATEGORICAL or BOOLEAN. A declared rubric overrides it — a caller cannot claim a type the org's rubric contradicts.
    #[serde(rename = "dataType", skip_serializing_if = "Option::is_none")]
    pub data_type: Option<String>,
    /// ItemID attaches the score to one graded example.
    #[serde(rename = "datasetItemId", skip_serializing_if = "Option::is_none")]
    pub dataset_item_id: Option<String>,
    /// Dataset attaches the score to one dataset.
    #[serde(rename = "datasetName", skip_serializing_if = "Option::is_none")]
    pub dataset_name: Option<String>,
    /// Name is the score name. A rubric of the same name, if the org has declared one, decides this score's type and the values it may take.
    #[serde(rename = "name")]
    pub name: String,
    /// RunName attaches the score to one run.
    #[serde(rename = "runName", skip_serializing_if = "Option::is_none")]
    pub run_name: Option<String>,
    /// StringValue is the label of a CATEGORICAL score, which must be one the rubric allows.
    #[serde(rename = "stringValue", skip_serializing_if = "Option::is_none")]
    pub string_value: Option<String>,
    /// TraceID attaches the score to one model call.
    #[serde(rename = "traceId", skip_serializing_if = "Option::is_none")]
    pub trace_id: Option<String>,
    /// Value is the numeric score, which must be finite: NaN and Inf are refused. A BOOLEAN score takes 0 or 1.
    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
    pub value: Option<f64>,
}

impl ScoreReq {
    pub fn new(name: String) -> ScoreReq {
        ScoreReq {
            comment: None,
            data_type: None,
            dataset_item_id: None,
            dataset_name: None,
            name,
            run_name: None,
            string_value: None,
            trace_id: None,
            value: None,
        }
    }
}