1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/*
* 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,
}
}
}