Skip to main content

hanzo_client/models/
sample_ingest.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 SampleIngest {
16    /// GPUModel names the representative accelerator (\"GB10\"); GPUs carries how many. A heterogeneous host names its first card rather than inventing a summary.
17    #[serde(rename = "gpuModel", skip_serializing_if = "Option::is_none")]
18    pub gpu_model: Option<String>,
19    /// GPUUtil is accelerator utilization as a fraction 0..1; the warehouse clamps anything outside that.
20    #[serde(rename = "gpuUtil", skip_serializing_if = "Option::is_none")]
21    pub gpu_util: Option<f64>,
22    /// GPUs is how many accelerators this reading covers.
23    #[serde(rename = "gpus", skip_serializing_if = "Option::is_none")]
24    pub gpus: Option<i32>,
25    /// Host is the node's hostname, for display.
26    #[serde(rename = "host", skip_serializing_if = "Option::is_none")]
27    pub host: Option<String>,
28    /// MemFree is host memory still available, in BYTES.
29    #[serde(rename = "memFree", skip_serializing_if = "Option::is_none")]
30    pub mem_free: Option<i32>,
31    /// MemUsed is host memory in use, in BYTES.
32    #[serde(rename = "memUsed", skip_serializing_if = "Option::is_none")]
33    pub mem_used: Option<i32>,
34    /// Unit is the reporting node's own id — the same id it registered under, and the key the board joins this series onto. Required.
35    #[serde(rename = "unit", skip_serializing_if = "Option::is_none")]
36    pub unit: Option<String>,
37}
38
39impl SampleIngest {
40    pub fn new() -> SampleIngest {
41        SampleIngest {
42            gpu_model: None,
43            gpu_util: None,
44            gpus: None,
45            host: None,
46            mem_free: None,
47            mem_used: None,
48            unit: None,
49        }
50    }
51}
52