mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
56 lines
2.3 KiB
Swift
56 lines
2.3 KiB
Swift
//
|
|
// FleetSpec.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct FleetSpec: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** 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). */
|
|
public var arch: String?
|
|
/** CPUs is logical cores on the unit. */
|
|
public var cpus: Int64?
|
|
/** 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. */
|
|
public var gpuModel: 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. */
|
|
public var gpus: Int64?
|
|
/** 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. */
|
|
public var memory: Int64?
|
|
/** 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. */
|
|
public var os: String?
|
|
|
|
public init(arch: String? = nil, cpus: Int64? = nil, gpuModel: String? = nil, gpus: Int64? = nil, memory: Int64? = nil, os: String? = nil) {
|
|
self.arch = arch
|
|
self.cpus = cpus
|
|
self.gpuModel = gpuModel
|
|
self.gpus = gpus
|
|
self.memory = memory
|
|
self.os = os
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case arch
|
|
case cpus
|
|
case gpuModel
|
|
case gpus
|
|
case memory
|
|
case os
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(arch, forKey: .arch)
|
|
try container.encodeIfPresent(cpus, forKey: .cpus)
|
|
try container.encodeIfPresent(gpuModel, forKey: .gpuModel)
|
|
try container.encodeIfPresent(gpus, forKey: .gpus)
|
|
try container.encodeIfPresent(memory, forKey: .memory)
|
|
try container.encodeIfPresent(os, forKey: .os)
|
|
}
|
|
}
|
|
|