1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* 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 DashResp {
/// Account is the linked account that was asked about, when one was named.
#[serde(rename = "account", skip_serializing_if = "Option::is_none")]
pub account: Option<String>,
/// Available is false when the warehouse could not be read. That means \"no answer\", NOT \"no usage\" — the two lists below are then empty for a reason.
#[serde(rename = "available", skip_serializing_if = "Option::is_none")]
pub available: Option<bool>,
/// Current is the newest window instance of each lane — the dash headline.
#[serde(rename = "current", skip_serializing_if = "Option::is_none")]
pub current: Option<Vec<models::UsageWindowView>>,
/// From is the inclusive start of that window, RFC3339 UTC.
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
/// Provider is the upstream that was asked about, echoed back.
#[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
pub provider: Option<String>,
/// Range is the window that was served: 1h, 24h, 7d or 30d.
#[serde(rename = "range", skip_serializing_if = "Option::is_none")]
pub range: Option<String>,
/// Scope says whose rows these are: the caller's own linked accounts.
#[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
pub scope: Option<String>,
/// Source names the meter of record — the provider's own login, not Hanzo.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// To is the exclusive end of that window, RFC3339 UTC.
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
/// Windows is every instance in range, newest first — the history behind it.
#[serde(rename = "windows", skip_serializing_if = "Option::is_none")]
pub windows: Option<Vec<models::UsageWindowView>>,
}
impl DashResp {
pub fn new() -> DashResp {
DashResp {
account: None,
available: None,
current: None,
from: None,
provider: None,
range: None,
scope: None,
source: None,
to: None,
windows: None,
}
}
}