mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
59 lines
2.5 KiB
Swift
59 lines
2.5 KiB
Swift
//
|
|
// O11yClusterRecord.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yClusterRecord: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var clusterCPU: Double?
|
|
public var clusterCPUAllocatable: Double?
|
|
public var clusterMemory: Double?
|
|
public var clusterMemoryAllocatable: Double?
|
|
/** TODO(nikhilmantri0902): once the underlying attr key is migrated to k8s.cluster.uid (see ClusterNameAttrKey), surface ClusterUID alongside (or replace) ClusterName. */
|
|
public var clusterName: String?
|
|
public var meta: [String: String]?
|
|
public var nodeCountsByReadiness: O11yNodeCountsByReadiness?
|
|
public var podCountsByPhase: O11yPodCountsByPhase?
|
|
|
|
public init(clusterCPU: Double? = nil, clusterCPUAllocatable: Double? = nil, clusterMemory: Double? = nil, clusterMemoryAllocatable: Double? = nil, clusterName: String? = nil, meta: [String: String]? = nil, nodeCountsByReadiness: O11yNodeCountsByReadiness? = nil, podCountsByPhase: O11yPodCountsByPhase? = nil) {
|
|
self.clusterCPU = clusterCPU
|
|
self.clusterCPUAllocatable = clusterCPUAllocatable
|
|
self.clusterMemory = clusterMemory
|
|
self.clusterMemoryAllocatable = clusterMemoryAllocatable
|
|
self.clusterName = clusterName
|
|
self.meta = meta
|
|
self.nodeCountsByReadiness = nodeCountsByReadiness
|
|
self.podCountsByPhase = podCountsByPhase
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case clusterCPU
|
|
case clusterCPUAllocatable
|
|
case clusterMemory
|
|
case clusterMemoryAllocatable
|
|
case clusterName
|
|
case meta
|
|
case nodeCountsByReadiness
|
|
case podCountsByPhase
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(clusterCPU, forKey: .clusterCPU)
|
|
try container.encodeIfPresent(clusterCPUAllocatable, forKey: .clusterCPUAllocatable)
|
|
try container.encodeIfPresent(clusterMemory, forKey: .clusterMemory)
|
|
try container.encodeIfPresent(clusterMemoryAllocatable, forKey: .clusterMemoryAllocatable)
|
|
try container.encodeIfPresent(clusterName, forKey: .clusterName)
|
|
try container.encodeIfPresent(meta, forKey: .meta)
|
|
try container.encodeIfPresent(nodeCountsByReadiness, forKey: .nodeCountsByReadiness)
|
|
try container.encodeIfPresent(podCountsByPhase, forKey: .podCountsByPhase)
|
|
}
|
|
}
|
|
|