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 RoutedUsage {
    /// Account is the provider-side account identifier.
    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
    pub account: Option<String>,
    /// Billing is how the routed inference bills: plan or commerce.
    #[serde(rename = "billing", skip_serializing_if = "Option::is_none")]
    pub billing: Option<String>,
    /// CompletionTokens is the routed completion-token count.
    #[serde(rename = "completionTokens", skip_serializing_if = "Option::is_none")]
    pub completion_tokens: Option<i32>,
    /// CostCents is the routed cost in cents.
    #[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
    pub cost_cents: Option<i32>,
    /// Kind is how the account authenticates: subscription or apikey.
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// PromptTokens is the routed prompt-token count.
    #[serde(rename = "promptTokens", skip_serializing_if = "Option::is_none")]
    pub prompt_tokens: Option<i32>,
    /// Provider is the AI provider the row's account belongs to.
    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    /// Requests is how many requests the gateway routed through this account.
    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
    pub requests: Option<i32>,
    /// TotalTokens is the routed total token count.
    #[serde(rename = "totalTokens", skip_serializing_if = "Option::is_none")]
    pub total_tokens: Option<i32>,
}

impl RoutedUsage {
    pub fn new() -> RoutedUsage {
        RoutedUsage {
            account: None,
            billing: None,
            completion_tokens: None,
            cost_cents: None,
            kind: None,
            prompt_tokens: None,
            provider: None,
            requests: None,
            total_tokens: None,
        }
    }
}