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 GpuView {
    /// ID is the card's address: its host machine's id, \"#\", and the card's ordinal within that machine (\"gpu-1#0\"). Stable for as long as the machine is, and the only id a single accelerator has — providers do not name cards.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// Location is where the card physically sits, which for every source today is the same value Region carries — the console renders it in its own column.
    #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
    pub location: Option<String>,
    /// Machine is the id of the machine holding this card, addressable as-is on /v1/visor/machines/:id.
    #[serde(rename = "machine", skip_serializing_if = "Option::is_none")]
    pub machine: Option<String>,
    /// Memory is the card's VRAM as its own tooling reported it (\"122880 MiB\") — a display string in the reporter's units, not a byte count. BYO cards carry it (nvidia-smi); Visor's machine object states no VRAM, so a rented card leaves it empty and the console renders \"—\" rather than a fabricated 0.
    #[serde(rename = "memory", skip_serializing_if = "Option::is_none")]
    pub memory: Option<String>,
    /// Model is the accelerator: the model token read out of the size slug for a Visor GPU droplet (\"H100\", \"MI300X\"), or the name nvidia-smi reported for a BYO card (\"NVIDIA GB10\").
    #[serde(rename = "model", skip_serializing_if = "Option::is_none")]
    pub model: Option<String>,
    /// Name is the HOST MACHINE's display name, not the card's — every card in a gpu-h100x8 node repeats it. Model is what says which accelerator this is.
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<String>,
    /// Provider distinguishes a BYO accelerator (\"byo\") from a Visor-provisioned one (the host machine's real provider). It is what tells a card the org owns from a card the org rents.
    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
    pub provider: Option<String>,
    /// Region is the host machine's provider region slug; \"on-prem\" for a BYO card.
    #[serde(rename = "region", skip_serializing_if = "Option::is_none")]
    pub region: Option<String>,
    /// Status is the HOST MACHINE's lifecycle state, because nothing upstream reports a card's own health. A card reads running because its machine does.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
}

impl GpuView {
    pub fn new() -> GpuView {
        GpuView {
            id: None,
            location: None,
            machine: None,
            memory: None,
            model: None,
            name: None,
            provider: None,
            region: None,
            status: None,
        }
    }
}