hanzo_client/models/usage_analytics_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 UsageAnalyticsView {
16 /// End is the window's exclusive end, RFC3339 UTC.
17 #[serde(rename = "end", skip_serializing_if = "Option::is_none")]
18 pub end: Option<String>,
19 /// Export is whether the resolved plan allows exporting these rows.
20 #[serde(rename = "export", skip_serializing_if = "Option::is_none")]
21 pub export: Option<bool>,
22 /// Plan echoes the plan id the entitlement was resolved from.
23 #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
24 pub plan: Option<String>,
25 /// Providers is the per-provider roll-up over the window.
26 #[serde(rename = "providers", skip_serializing_if = "Option::is_none")]
27 pub providers: Option<Box<models::ProviderBreakdown>>,
28 /// Range is the label that was ASKED for. A plan whose retention is shorter than that window is served the retention instead, so read start and end for the window the rows actually cover and retentionDays for the reason — on a clamped read the label is longer than what was served.
29 #[serde(rename = "range", skip_serializing_if = "Option::is_none")]
30 pub range: Option<String>,
31 /// RetentionDays is how far back the resolved plan allows reading.
32 #[serde(rename = "retentionDays", skip_serializing_if = "Option::is_none")]
33 pub retention_days: Option<i32>,
34 /// Scope is the tenant the rows were read under — the validated principal's org.
35 #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
36 pub scope: Option<Box<models::UsageScope>>,
37 /// Start is the window's inclusive start, RFC3339 UTC, AFTER the retention clamp — so it may be later than the start that was asked for.
38 #[serde(rename = "start", skip_serializing_if = "Option::is_none")]
39 pub start: Option<String>,
40}
41
42impl UsageAnalyticsView {
43 pub fn new() -> UsageAnalyticsView {
44 UsageAnalyticsView {
45 end: None,
46 export: None,
47 plan: None,
48 providers: None,
49 range: None,
50 retention_days: None,
51 scope: None,
52 start: None,
53 }
54 }
55}
56