Skip to main content

hanzo_client/models/
routed_usage.rs

1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct RoutedUsage {
16    /// Account is the provider-side account identifier.
17    #[serde(rename = "account", skip_serializing_if = "Option::is_none")]
18    pub account: Option<String>,
19    /// Billing is how the routed inference bills: plan or commerce.
20    #[serde(rename = "billing", skip_serializing_if = "Option::is_none")]
21    pub billing: Option<String>,
22    /// CompletionTokens is the routed completion-token count.
23    #[serde(rename = "completionTokens", skip_serializing_if = "Option::is_none")]
24    pub completion_tokens: Option<i32>,
25    /// CostCents is the routed cost in cents.
26    #[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
27    pub cost_cents: Option<i32>,
28    /// Kind is how the account authenticates: subscription or apikey.
29    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
30    pub kind: Option<String>,
31    /// PromptTokens is the routed prompt-token count.
32    #[serde(rename = "promptTokens", skip_serializing_if = "Option::is_none")]
33    pub prompt_tokens: Option<i32>,
34    /// Provider is the AI provider the row's account belongs to.
35    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
36    pub provider: Option<String>,
37    /// Requests is how many requests the gateway routed through this account.
38    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
39    pub requests: Option<i32>,
40    /// TotalTokens is the routed total token count.
41    #[serde(rename = "totalTokens", skip_serializing_if = "Option::is_none")]
42    pub total_tokens: Option<i32>,
43}
44
45impl RoutedUsage {
46    pub fn new() -> RoutedUsage {
47        RoutedUsage {
48            account: None,
49            billing: None,
50            completion_tokens: None,
51            cost_cents: None,
52            kind: None,
53            prompt_tokens: None,
54            provider: None,
55            requests: None,
56            total_tokens: None,
57        }
58    }
59}
60