Skip to main content

hanzo_client/models/
total_view.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 TotalView {
16    /// Confidence says how real the row's numbers are.
17    #[serde(rename = "confidence", skip_serializing_if = "Option::is_none")]
18    pub confidence: Option<String>,
19    /// CostCents is the period's spend in cents, in the row's own ledger.
20    #[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
21    pub cost_cents: Option<i32>,
22    /// Provider is the provider the row totals.
23    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
24    pub provider: Option<String>,
25    /// Requests is the period's request count.
26    #[serde(rename = "requests", skip_serializing_if = "Option::is_none")]
27    pub requests: Option<i32>,
28    /// Scope is whose usage the row measures: user or org.
29    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
30    pub scope: Option<String>,
31    /// Source is whose meter the row came from: account or hanzo.
32    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
33    pub source: Option<String>,
34    /// Tokens is the period's total token count.
35    #[serde(rename = "tokens", skip_serializing_if = "Option::is_none")]
36    pub tokens: Option<i32>,
37    /// UsedPct is the plan consumption percentage, on the account side.
38    #[serde(rename = "usedPct", skip_serializing_if = "Option::is_none")]
39    pub used_pct: Option<f64>,
40    /// Window is the window class the row totals, on the account side.
41    #[serde(rename = "window", skip_serializing_if = "Option::is_none")]
42    pub window: Option<String>,
43    /// Windows is how many window instances the row folds.
44    #[serde(rename = "windows", skip_serializing_if = "Option::is_none")]
45    pub windows: Option<i32>,
46}
47
48impl TotalView {
49    pub fn new() -> TotalView {
50        TotalView {
51            confidence: None,
52            cost_cents: None,
53            provider: None,
54            requests: None,
55            scope: None,
56            source: None,
57            tokens: None,
58            used_pct: None,
59            window: None,
60            windows: None,
61        }
62    }
63}
64