Skip to main content

hanzo_client/models/
spec.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 Spec {
16    /// amd64 | arm64 | ...
17    #[serde(rename = "arch", skip_serializing_if = "Option::is_none")]
18    pub arch: Option<String>,
19    /// logical cores
20    #[serde(rename = "cpus", skip_serializing_if = "Option::is_none")]
21    pub cpus: Option<i32>,
22    /// GPUs is every accelerator the machine advertises, one entry each, capped at 32 on write. Empty means the probe found none — and that is the answer a Need is checked against, so a machine with no entry here clears no accelerator floor. The list is not vendor-filtered: what satisfies a job is counts and VRAM, never a brand (see Need).
23    #[serde(rename = "gpus", skip_serializing_if = "Option::is_none")]
24    pub gpus: Option<Vec<models::Gpu>>,
25    /// total RAM, bytes
26    #[serde(rename = "memory", skip_serializing_if = "Option::is_none")]
27    pub memory: Option<i32>,
28    /// linux | darwin | windows
29    #[serde(rename = "os", skip_serializing_if = "Option::is_none")]
30    pub os: Option<String>,
31}
32
33impl Spec {
34    pub fn new() -> Spec {
35        Spec {
36            arch: None,
37            cpus: None,
38            gpus: None,
39            memory: None,
40            os: None,
41        }
42    }
43}
44