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
/*
* 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 SummaryResp {
/// Account reports the linked-accounts ledger's own availability, so a partial answer never fabricates this half. It is scoped to the CALLER: the accounts they linked, metered from each provider's own login.
#[serde(rename = "account", skip_serializing_if = "Option::is_none")]
pub account: Option<Box<models::SourceState>>,
/// From is when the window opens, RFC 3339 UTC. ONE resolver fixes it for both ledgers, so the account rows and the Hanzo rows always cover the same period — two resolvers could drift and turn the union into a lie.
#[serde(rename = "from", skip_serializing_if = "Option::is_none")]
pub from: Option<String>,
/// Hanzo reports the same for the Hanzo-routed ledger, which is scoped to the ORG rather than the caller — a different question over the same window. The two are independent: either can be unavailable while the other answers, and Rows then carries only the half that did.
#[serde(rename = "hanzo", skip_serializing_if = "Option::is_none")]
pub hanzo: Option<Box<models::SourceState>>,
/// Range is the resolved period label.
#[serde(rename = "range", skip_serializing_if = "Option::is_none")]
pub range: Option<String>,
/// Rows is the union of both ledgers, each row labelled by source and scope — concatenated, NEVER summed: a plan's percentage is not money.
#[serde(rename = "rows", skip_serializing_if = "Option::is_none")]
pub rows: Option<Vec<models::TotalView>>,
/// To is where the window closes, EXCLUSIVE, RFC 3339 UTC — the instant the read was served. Shared by both ledgers, for the reason From gives.
#[serde(rename = "to", skip_serializing_if = "Option::is_none")]
pub to: Option<String>,
}
impl SummaryResp {
pub fn new() -> SummaryResp {
SummaryResp {
account: None,
from: None,
hanzo: None,
range: None,
rows: None,
to: None,
}
}
}