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 O11yPeriodO11yLlmTrace {
    /// CompletionTokens is the trace's total output tokens.
    #[serde(rename = "completionTokens", skip_serializing_if = "Option::is_none")]
    pub completion_tokens: Option<i32>,
    /// ID is the trace id.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// LatencyMs is the trace's span, in milliseconds.
    #[serde(rename = "latencyMs", skip_serializing_if = "Option::is_none")]
    pub latency_ms: Option<f64>,
    /// Observations is how many observations the trace holds.
    #[serde(rename = "observations", skip_serializing_if = "Option::is_none")]
    pub observations: Option<i32>,
    /// PromptTokens is the trace's total input tokens.
    #[serde(rename = "promptTokens", skip_serializing_if = "Option::is_none")]
    pub prompt_tokens: Option<i32>,
    /// ServiceName is the app that emitted it.
    #[serde(rename = "serviceName", skip_serializing_if = "Option::is_none")]
    pub service_name: Option<String>,
    /// SessionID is the conversation the trace belongs to.
    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    /// TotalCost is the trace's total cost.
    #[serde(rename = "totalCost", skip_serializing_if = "Option::is_none")]
    pub total_cost: Option<f64>,
    /// TotalTokens is the trace's total tokens.
    #[serde(rename = "totalTokens", skip_serializing_if = "Option::is_none")]
    pub total_tokens: Option<i32>,
    /// UserID is the end user the trace is attributed to.
    #[serde(rename = "userId", skip_serializing_if = "Option::is_none")]
    pub user_id: Option<String>,
}

impl O11yPeriodO11yLlmTrace {
    pub fn new() -> O11yPeriodO11yLlmTrace {
        O11yPeriodO11yLlmTrace {
            completion_tokens: None,
            id: None,
            latency_ms: None,
            observations: None,
            prompt_tokens: None,
            service_name: None,
            session_id: None,
            total_cost: None,
            total_tokens: None,
            user_id: None,
        }
    }
}