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 TraceView {
    /// APIKeyHash is the non-reversible credential ref (never a plaintext key), so a trace correlates to the key that drove it without the store holding a secret.
    #[serde(rename = "apiKeyHash", skip_serializing_if = "Option::is_none")]
    pub api_key_hash: Option<String>,
    /// ItemID is the example the call answered.
    #[serde(rename = "datasetItemId", skip_serializing_if = "Option::is_none")]
    pub dataset_item_id: Option<String>,
    /// Dataset is the set the graded example came from.
    #[serde(rename = "datasetName", skip_serializing_if = "Option::is_none")]
    pub dataset_name: Option<String>,
    /// EndTime is when it returned.
    #[serde(rename = "endTime", skip_serializing_if = "Option::is_none")]
    pub end_time: Option<String>,
    /// ID is the trace's handle, the value a score points at.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Input is what the model was given.
    #[serde(rename = "input", skip_serializing_if = "Option::is_none")]
    pub input: Option<serde_json::Value>,
    /// LatencyMs is EndTime-StartTime in milliseconds, nil when the trace carries no timing (so the console renders \"—\", never a fabricated 0).
    #[serde(rename = "latencyMs", skip_serializing_if = "Option::is_none")]
    pub latency_ms: Option<f64>,
    /// Model is the model that answered.
    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    /// Name is the trace's label, \"eval:<run>\" for a call a run made.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Output is what it answered.
    #[serde(rename = "output", skip_serializing_if = "Option::is_none")]
    pub output: Option<String>,
    /// ProjectID is the sub-scope within the org the call was made under.
    #[serde(rename = "projectId", skip_serializing_if = "Option::is_none")]
    pub project_id: Option<String>,
    /// RunName is the run the call belongs to.
    #[serde(rename = "runName", skip_serializing_if = "Option::is_none")]
    pub run_name: Option<String>,
    /// SessionID groups the calls of one run.
    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    /// StartTime is when the call began.
    #[serde(rename = "startTime", skip_serializing_if = "Option::is_none")]
    pub start_time: Option<String>,
    /// Timestamp is the trace's own clock, equal to StartTime for a timed call.
    #[serde(rename = "timestamp", skip_serializing_if = "Option::is_none")]
    pub timestamp: Option<String>,
}

impl TraceView {
    pub fn new() -> TraceView {
        TraceView {
            api_key_hash: None,
            dataset_item_id: None,
            dataset_name: None,
            end_time: None,
            id: None,
            input: None,
            latency_ms: None,
            model: None,
            name: None,
            output: None,
            project_id: None,
            run_name: None,
            session_id: None,
            start_time: None,
            timestamp: None,
        }
    }
}