Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

74 lines
3.6 KiB
Swift

//
// GpuView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct GpuView: Sendable, Codable, ParameterConvertible, Hashable {
/** 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. */
public var id: 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. */
public var location: String?
/** Machine is the id of the machine holding this card, addressable as-is on /v1/compute/machines/:id. */
public var machine: 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. */
public var memory: 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\"). */
public var model: 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. */
public var name: 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. */
public var provider: String?
/** Region is the host machine's provider region slug; \"on-prem\" for a BYO card. */
public var region: 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. */
public var status: String?
public init(id: String? = nil, location: String? = nil, machine: String? = nil, memory: String? = nil, model: String? = nil, name: String? = nil, provider: String? = nil, region: String? = nil, status: String? = nil) {
self.id = id
self.location = location
self.machine = machine
self.memory = memory
self.model = model
self.name = name
self.provider = provider
self.region = region
self.status = status
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case id
case location
case machine
case memory
case model
case name
case provider
case region
case status
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(location, forKey: .location)
try container.encodeIfPresent(machine, forKey: .machine)
try container.encodeIfPresent(memory, forKey: .memory)
try container.encodeIfPresent(model, forKey: .model)
try container.encodeIfPresent(name, forKey: .name)
try container.encodeIfPresent(provider, forKey: .provider)
try container.encodeIfPresent(region, forKey: .region)
try container.encodeIfPresent(status, forKey: .status)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension GpuView: Identifiable {}