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 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,
        }
    }
}