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 LlmOverview {
    /// Available is true whenever the ledger answered — including with no usage in the window, which is honest zeros rather than a missing lens.
    #[serde(rename = "available", skip_serializing_if = "Option::is_none")]
    pub available: Option<bool>,
    /// CompletionTokens is the output half of Tokens.
    #[serde(rename = "completionTokens", skip_serializing_if = "Option::is_none")]
    pub completion_tokens: Option<i32>,
    /// ErrorRate is Errors/Requests, 0..1, rounded to three places. Zero when there were no requests.
    #[serde(rename = "errorRate", skip_serializing_if = "Option::is_none")]
    pub error_rate: Option<f64>,
    /// Errors is how many of Requests failed.
    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
    pub errors: Option<i32>,
    /// Models is how many distinct models the org called.
    #[serde(rename = "models", skip_serializing_if = "Option::is_none")]
    pub models: Option<i32>,
    /// PromptTokens is the input half of Tokens.
    #[serde(rename = "promptTokens", skip_serializing_if = "Option::is_none")]
    pub prompt_tokens: Option<i32>,
    /// Providers is how many distinct providers served them.
    #[serde(rename = "providers", skip_serializing_if = "Option::is_none")]
    pub providers: Option<i32>,
    /// Requests is how many LLM calls the org made in the window.
    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
    pub requests: Option<i32>,
    /// Source is the warehouse table the lens read.
    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
    pub source: Option<String>,
    /// SpendCents is what those calls cost, in cents.
    #[serde(rename = "spendCents", skip_serializing_if = "Option::is_none")]
    pub spend_cents: Option<i32>,
    /// Tokens is prompt plus completion tokens over those calls.
    #[serde(rename = "tokens", skip_serializing_if = "Option::is_none")]
    pub tokens: Option<i32>,
}

impl LlmOverview {
    pub fn new() -> LlmOverview {
        LlmOverview {
            available: None,
            completion_tokens: None,
            error_rate: None,
            errors: None,
            models: None,
            prompt_tokens: None,
            providers: None,
            requests: None,
            source: None,
            spend_cents: None,
            tokens: None,
        }
    }
}