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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
/*
* 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 SampleView {
/// At is when the reading was MEASURED, RFC 3339 in UTC — the x-axis a chart plots against. The series is returned oldest first, so it only increases.
#[serde(rename = "at", skip_serializing_if = "Option::is_none")]
pub at: Option<String>,
/// CostCents is what this unit resold for over the hour the reading falls in, in whole US cents. 0 means UNPRICED, not free: the operator's own machines — a linked run-target, a dialed-in BYO worker — are metered for utilization and never resold, so only a priced source ever fills it.
#[serde(rename = "costCents", skip_serializing_if = "Option::is_none")]
pub cost_cents: Option<i32>,
/// CPUs is logical cores. The static capability rides every row on purpose: a chart can size load against cores without joining a registry whose row may since have been rewritten or the unit deregistered.
#[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
pub cpus: Option<i32>,
/// GPUModel names the representative accelerator (\"GB10\"); GPUs carries how many.
#[serde(rename = "gpuModel", skip_serializing_if = "Option::is_none")]
pub gpu_model: Option<String>,
/// GPUUtil is aggregate accelerator utilization as a FRACTION of 1 — 0.42 is 42% busy. Anything a reporter sends outside 0..1 is clamped into it on write.
#[serde(rename = "gpuUtil", skip_serializing_if = "Option::is_none")]
pub gpu_util: Option<f64>,
/// GPUs is how many accelerators the reading covers.
#[serde(rename = "gpus", skip_serializing_if = "Option::is_none")]
pub gpus: Option<i32>,
/// Host is the hostname the unit reported at the time of the reading.
#[serde(rename = "host", skip_serializing_if = "Option::is_none")]
pub host: Option<String>,
/// Kind is what the measured unit is: laptop, cloud, gpu, cluster, machine or worker.
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Load1 is the 1-minute load average — runnable processes, not a percentage.
#[serde(rename = "load1", skip_serializing_if = "Option::is_none")]
pub load1: Option<f64>,
/// Load5 is the 5-minute load average, the same units as Load1.
#[serde(rename = "load5", skip_serializing_if = "Option::is_none")]
pub load5: Option<f64>,
/// Load15 is the 15-minute load average, the same units as Load1.
#[serde(rename = "load15", skip_serializing_if = "Option::is_none")]
pub load15: Option<f64>,
/// MemFree is host memory available, in BYTES, as reported rather than derived.
#[serde(rename = "memFree", skip_serializing_if = "Option::is_none")]
pub mem_free: Option<i32>,
/// MemUsed is host memory in use, in BYTES.
#[serde(rename = "memUsed", skip_serializing_if = "Option::is_none")]
pub mem_used: Option<i32>,
/// Memory is total system RAM in BYTES at the time of the reading.
#[serde(rename = "memory", skip_serializing_if = "Option::is_none")]
pub memory: Option<i32>,
/// Source is the plane that reported the reading: \"agent\", \"byo\" or \"visor\" — the same vocabulary the board's rows carry, and what ?source= narrows on.
#[serde(rename = "source", skip_serializing_if = "Option::is_none")]
pub source: Option<String>,
/// Unit is the source's own id for the measured unit. With Source it is the key the chart groups by, and the key the board joins a unit's latest reading on.
#[serde(rename = "unit", skip_serializing_if = "Option::is_none")]
pub unit: Option<String>,
}
impl SampleView {
pub fn new() -> SampleView {
SampleView {
at: None,
cost_cents: None,
cpus: None,
gpu_model: None,
gpu_util: None,
gpus: None,
host: None,
kind: None,
load1: None,
load5: None,
load15: None,
mem_free: None,
mem_used: None,
memory: None,
source: None,
unit: None,
}
}
}