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
/*
* 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 FleetSpec {
/// Arch is the CPU architecture, amd64 or arm64, and it is what decides whether a binary built for the fleet will run here. Only the sources that report one carry it (a linked run-target, a BYO worker).
#[serde(rename = "arch", skip_serializing_if = "Option::is_none")]
pub arch: Option<String>,
/// CPUs is logical cores on the unit.
#[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
pub cpus: Option<i32>,
/// GPUModel names the FIRST accelerator (\"NVIDIA GB10\") as the representative of the set; GPUs carries how many. Empty for a cluster, whose cards are counted rather than modelled, and for a unit with none.
#[serde(rename = "gpuModel", skip_serializing_if = "Option::is_none")]
pub gpu_model: Option<String>,
/// GPUs is how many accelerators the unit has. For a cluster it is the vendor totals summed across every node, so it counts cards, not machines.
#[serde(rename = "gpus", skip_serializing_if = "Option::is_none")]
pub gpus: Option<i32>,
/// Memory is total system RAM in BYTES — not GB, and not what is free right now (fleetMetrics carries that). Absent when the source reports no RAM figure.
#[serde(rename = "memory", skip_serializing_if = "Option::is_none")]
pub memory: Option<i32>,
/// OS is the operating system the unit runs: linux, darwin or windows. Empty when the source does not report one — a cluster row does not.
#[serde(rename = "os", skip_serializing_if = "Option::is_none")]
pub os: Option<String>,
}
impl FleetSpec {
pub fn new() -> FleetSpec {
FleetSpec {
arch: None,
cpus: None,
gpu_model: None,
gpus: None,
memory: None,
os: None,
}
}
}