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.
79 lines
2.9 KiB
Swift
79 lines
2.9 KiB
Swift
//
|
|
// ClusterDetailView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ClusterDetailView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var amdGpu: Int64?
|
|
public var createdAt: String?
|
|
public var doClusterId: String?
|
|
public var doksClusterId: String?
|
|
public var kind: String?
|
|
public var name: String?
|
|
public var nodeCount: Int64?
|
|
public var nodePools: [NodePoolView]?
|
|
public var nodeSize: String?
|
|
/** Nodes is every worker node in the cluster, each in the same shape the machines surface uses — a node IS a machine, addressable by its own id. This is the individual hardware behind the pool counts above. */
|
|
public var nodes: [MachineView]?
|
|
public var nvidiaGpu: Int64?
|
|
public var region: String?
|
|
public var status: String?
|
|
|
|
public init(amdGpu: Int64? = nil, createdAt: String? = nil, doClusterId: String? = nil, doksClusterId: String? = nil, kind: String? = nil, name: String? = nil, nodeCount: Int64? = nil, nodePools: [NodePoolView]? = nil, nodeSize: String? = nil, nodes: [MachineView]? = nil, nvidiaGpu: Int64? = nil, region: String? = nil, status: String? = nil) {
|
|
self.amdGpu = amdGpu
|
|
self.createdAt = createdAt
|
|
self.doClusterId = doClusterId
|
|
self.doksClusterId = doksClusterId
|
|
self.kind = kind
|
|
self.name = name
|
|
self.nodeCount = nodeCount
|
|
self.nodePools = nodePools
|
|
self.nodeSize = nodeSize
|
|
self.nodes = nodes
|
|
self.nvidiaGpu = nvidiaGpu
|
|
self.region = region
|
|
self.status = status
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case amdGpu
|
|
case createdAt
|
|
case doClusterId
|
|
case doksClusterId
|
|
case kind
|
|
case name
|
|
case nodeCount
|
|
case nodePools
|
|
case nodeSize
|
|
case nodes
|
|
case nvidiaGpu
|
|
case region
|
|
case status
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(amdGpu, forKey: .amdGpu)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(doClusterId, forKey: .doClusterId)
|
|
try container.encodeIfPresent(doksClusterId, forKey: .doksClusterId)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(nodeCount, forKey: .nodeCount)
|
|
try container.encodeIfPresent(nodePools, forKey: .nodePools)
|
|
try container.encodeIfPresent(nodeSize, forKey: .nodeSize)
|
|
try container.encodeIfPresent(nodes, forKey: .nodes)
|
|
try container.encodeIfPresent(nvidiaGpu, forKey: .nvidiaGpu)
|
|
try container.encodeIfPresent(region, forKey: .region)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
}
|
|
}
|
|
|