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 ResourceUsage {
    /// CostCents would be the window's spend in cents. Always null here — the money a run costs is the metering ledger's, joined by the run id, and repeating it from this side would be a second number that could disagree with the bill.
    #[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
    pub cost_cents: Option<f64>,
    /// CPUVcpuHours would be vCPU-hours over the window. Always null: this store holds agent definitions and run I/O, and nothing here meters a CPU. Null is the honest answer and 0 would be a claim.
    #[serde(rename = "cpuVcpuHours", skip_serializing_if = "Option::is_none")]
    pub cpu_vcpu_hours: Option<f64>,
    /// MemGbHours would be gigabyte-hours of memory. Always null, same reason.
    #[serde(rename = "memGbHours", skip_serializing_if = "Option::is_none")]
    pub mem_gb_hours: Option<f64>,
    /// StorageIoBytes would be bytes moved to and from storage. Always null, same reason.
    #[serde(rename = "storageIoBytes", skip_serializing_if = "Option::is_none")]
    pub storage_io_bytes: Option<f64>,
}

impl ResourceUsage {
    pub fn new() -> ResourceUsage {
        ResourceUsage {
            cost_cents: None,
            cpu_vcpu_hours: None,
            mem_gb_hours: None,
            storage_io_bytes: None,
        }
    }
}