Skip to main content

hanzo_client/models/
provider_row.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 ProviderRow {
16    /// CostCents is what they cost the org, in US cents.
17    #[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
18    pub cost_cents: Option<i32>,
19    /// Provider is the upstream the requests were routed to, e.g. anthropic.
20    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
21    pub provider: Option<String>,
22    /// Requests is how many completions the org made against that provider.
23    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
24    pub requests: Option<i32>,
25    /// Tokens is the total tokens those completions consumed, prompt plus completion.
26    #[serde(rename = "tokens", skip_serializing_if = "Option::is_none")]
27    pub tokens: Option<i32>,
28}
29
30impl ProviderRow {
31    pub fn new() -> ProviderRow {
32        ProviderRow {
33            cost_cents: None,
34            provider: None,
35            requests: None,
36            tokens: None,
37        }
38    }
39}
40