hanzo_client/models/resource_usage.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 ResourceUsage {
16 /// 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.
17 #[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
18 pub cost_cents: Option<f64>,
19 /// 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.
20 #[serde(rename = "cpuVcpuHours", skip_serializing_if = "Option::is_none")]
21 pub cpu_vcpu_hours: Option<f64>,
22 /// MemGbHours would be gigabyte-hours of memory. Always null, same reason.
23 #[serde(rename = "memGbHours", skip_serializing_if = "Option::is_none")]
24 pub mem_gb_hours: Option<f64>,
25 /// StorageIoBytes would be bytes moved to and from storage. Always null, same reason.
26 #[serde(rename = "storageIoBytes", skip_serializing_if = "Option::is_none")]
27 pub storage_io_bytes: Option<f64>,
28}
29
30impl ResourceUsage {
31 pub fn new() -> ResourceUsage {
32 ResourceUsage {
33 cost_cents: None,
34 cpu_vcpu_hours: None,
35 mem_gb_hours: None,
36 storage_io_bytes: None,
37 }
38 }
39}
40