Files
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
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.
2026-08-23 10:04:41 -07:00

69 lines
2.9 KiB
Swift

//
// PatchTargetIn.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct PatchTargetIn: Sendable, Codable, ParameterConvertible, Hashable {
/** Capacity rewrites the human summary, up to 256 characters. \"\" clears it. */
public var capacity: String?
/** Host re-points the hostname sessions are matched by. Moving it moves the load: the session counts follow the new name from the next read. */
public var host: String?
/** ID is the target to update, from the path. */
public var id: String?
/** Kind re-files it under laptop | cloud | gpu | cluster | machine. */
public var kind: String?
/** Label renames the machine, up to 128 characters. Empty STRING is refused — a target with no name is a row nobody can pick out of a fleet. */
public var label: String?
/** Metrics replaces the live sample, and sending one IS A HEARTBEAT: the server stamps the time and appends the point to the fleet series. Sending an all-zero sample CLEARS the heartbeat — the machine goes back to having no liveness fact at all, and its stored status is taken at face value again. */
public var metrics: Metrics?
/** Spec replaces the static capability whole, sanitized and clamped the same way a register's is. */
public var spec: Spec?
/** Status sets operator INTENT: online | offline | draining. Draining is how a machine is taken out of dispatch without ending what is already on it. What comes back may still read offline, because the heartbeat outranks the intent. */
public var status: String?
public init(capacity: String? = nil, host: String? = nil, id: String? = nil, kind: String? = nil, label: String? = nil, metrics: Metrics? = nil, spec: Spec? = nil, status: String? = nil) {
self.capacity = capacity
self.host = host
self.id = id
self.kind = kind
self.label = label
self.metrics = metrics
self.spec = spec
self.status = status
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case capacity
case host
case id
case kind
case label
case metrics
case spec
case status
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(capacity, forKey: .capacity)
try container.encodeIfPresent(host, forKey: .host)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(kind, forKey: .kind)
try container.encodeIfPresent(label, forKey: .label)
try container.encodeIfPresent(metrics, forKey: .metrics)
try container.encodeIfPresent(spec, forKey: .spec)
try container.encodeIfPresent(status, forKey: .status)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension PatchTargetIn: Identifiable {}