hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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 UsageAnalyticsView {
    /// End is the window's exclusive end, RFC3339 UTC.
    #[serde(rename = "end", skip_serializing_if = "Option::is_none")]
    pub end: Option<String>,
    /// Export is whether the resolved plan allows exporting these rows.
    #[serde(rename = "export", skip_serializing_if = "Option::is_none")]
    pub export: Option<bool>,
    /// Plan echoes the plan id the entitlement was resolved from.
    #[serde(rename = "plan", skip_serializing_if = "Option::is_none")]
    pub plan: Option<String>,
    /// Providers is the per-provider roll-up over the window.
    #[serde(rename = "providers", skip_serializing_if = "Option::is_none")]
    pub providers: Option<Box<models::ProviderBreakdown>>,
    /// 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.
    #[serde(rename = "range", skip_serializing_if = "Option::is_none")]
    pub range: Option<String>,
    /// RetentionDays is how far back the resolved plan allows reading.
    #[serde(rename = "retentionDays", skip_serializing_if = "Option::is_none")]
    pub retention_days: Option<i32>,
    /// Scope is the tenant the rows were read under — the validated principal's org.
    #[serde(rename = "scope", skip_serializing_if = "Option::is_none")]
    pub scope: Option<Box<models::UsageScope>>,
    /// 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.
    #[serde(rename = "start", skip_serializing_if = "Option::is_none")]
    pub start: Option<String>,
}

impl UsageAnalyticsView {
    pub fn new() -> UsageAnalyticsView {
        UsageAnalyticsView {
            end: None,
            export: None,
            plan: None,
            providers: None,
            range: None,
            retention_days: None,
            scope: None,
            start: None,
        }
    }
}