hanzo-client 8.5.156

Generated client for the Hanzo API — every service, one crate.
Documentation
/*
 * 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,
        }
    }
}