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.
61 lines
2.2 KiB
Swift
61 lines
2.2 KiB
Swift
//
|
|
// SampleIngest.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SampleIngest: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** GPUModel names the representative accelerator (\"GB10\"); GPUs carries how many. A heterogeneous host names its first card rather than inventing a summary. */
|
|
public var gpuModel: String?
|
|
/** GPUUtil is accelerator utilization as a fraction 0..1; the warehouse clamps anything outside that. */
|
|
public var gpuUtil: Double?
|
|
/** GPUs is how many accelerators this reading covers. */
|
|
public var gpus: Int64?
|
|
/** Host is the node's hostname, for display. */
|
|
public var host: String?
|
|
/** MemFree is host memory still available, in BYTES. */
|
|
public var memFree: Int64?
|
|
/** MemUsed is host memory in use, in BYTES. */
|
|
public var memUsed: Int64?
|
|
/** Unit is the reporting node's own id — the same id it registered under, and the key the board joins this series onto. Required. */
|
|
public var unit: String?
|
|
|
|
public init(gpuModel: String? = nil, gpuUtil: Double? = nil, gpus: Int64? = nil, host: String? = nil, memFree: Int64? = nil, memUsed: Int64? = nil, unit: String? = nil) {
|
|
self.gpuModel = gpuModel
|
|
self.gpuUtil = gpuUtil
|
|
self.gpus = gpus
|
|
self.host = host
|
|
self.memFree = memFree
|
|
self.memUsed = memUsed
|
|
self.unit = unit
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case gpuModel
|
|
case gpuUtil
|
|
case gpus
|
|
case host
|
|
case memFree
|
|
case memUsed
|
|
case unit
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(gpuModel, forKey: .gpuModel)
|
|
try container.encodeIfPresent(gpuUtil, forKey: .gpuUtil)
|
|
try container.encodeIfPresent(gpus, forKey: .gpus)
|
|
try container.encodeIfPresent(host, forKey: .host)
|
|
try container.encodeIfPresent(memFree, forKey: .memFree)
|
|
try container.encodeIfPresent(memUsed, forKey: .memUsed)
|
|
try container.encodeIfPresent(unit, forKey: .unit)
|
|
}
|
|
}
|
|
|