Skip to main content

hanzo_client/models/
usage_summary.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 UsageSummary {
16    /// Accounts is the caller's own linked provider accounts beside the org's Hanzo-routed usage, labelled row by row and never summed together.
17    #[serde(rename = "accounts", skip_serializing_if = "Option::is_none")]
18    pub accounts: Option<Box<models::Accounts>>,
19    /// End is the window's exclusive end, RFC3339 UTC.
20    #[serde(rename = "end", skip_serializing_if = "Option::is_none")]
21    pub end: Option<String>,
22    /// Interval is the bucket width the spend series is gap-filled at.
23    #[serde(rename = "interval", skip_serializing_if = "Option::is_none")]
24    pub interval: Option<String>,
25    /// LLM is the org's Hanzo-routed inference totals from the warehouse.
26    #[serde(rename = "llm", skip_serializing_if = "Option::is_none")]
27    pub llm: Option<Box<models::Llm>>,
28    /// Range is the window label that was served.
29    #[serde(rename = "range", skip_serializing_if = "Option::is_none")]
30    pub range: Option<String>,
31    /// Scope is the tenant and subject the roll-up was answered for.
32    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
33    pub scope: Option<Box<models::UsageScope>>,
34    /// Sources says which upstreams actually answered, so a zero can be read as \"no data yet\" rather than as a measurement.
35    #[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
36    pub sources: Option<Box<models::Sources>>,
37    /// Spend is the categorized cost roll-up from the billing ledger.
38    #[serde(rename = "spend", skip_serializing_if = "Option::is_none")]
39    pub spend: Option<Box<models::Spend>>,
40    /// Start is the window's inclusive start, RFC3339 UTC.
41    #[serde(rename = "start", skip_serializing_if = "Option::is_none")]
42    pub start: Option<String>,
43}
44
45impl UsageSummary {
46    pub fn new() -> UsageSummary {
47        UsageSummary {
48            accounts: None,
49            end: None,
50            interval: None,
51            llm: None,
52            range: None,
53            scope: None,
54            sources: None,
55            spend: None,
56            start: None,
57        }
58    }
59}
60