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

81 lines
3.1 KiB
Swift

//
// RouteCandidate.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct RouteCandidate: Sendable, Codable, ParameterConvertible, Hashable {
/** Account is the provider-side account identifier. */
public var account: String?
/** Available reports whether the candidate is routable right now. */
public var available: Bool?
/** Billing is the cost consequence of dialing this candidate: plan (the user's own subscription) or commerce (the metered gateway path). */
public var billing: String?
/** HeadroomPct is the remaining rate-limit capacity, 0..100. A link with no snapshot counts as full headroom. */
public var headroomPct: Double?
/** Host is that machine's hostname label. */
public var host: String?
/** Kind is how the account authenticates: subscription or apikey. */
public var kind: String?
/** LinkID is the underlying link's opaque handle. */
public var linkId: String?
/** Machine is the machine the account is signed in on. */
public var machine: String?
/** Plan is the provider plan label the account is on. */
public var plan: String?
/** Provider is the AI provider the candidate account belongs to. */
public var provider: String?
/** Reason says why the candidate is not routable, when Available is false. */
public var reason: String?
public init(account: String? = nil, available: Bool? = nil, billing: String? = nil, headroomPct: Double? = nil, host: String? = nil, kind: String? = nil, linkId: String? = nil, machine: String? = nil, plan: String? = nil, provider: String? = nil, reason: String? = nil) {
self.account = account
self.available = available
self.billing = billing
self.headroomPct = headroomPct
self.host = host
self.kind = kind
self.linkId = linkId
self.machine = machine
self.plan = plan
self.provider = provider
self.reason = reason
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case account
case available
case billing
case headroomPct
case host
case kind
case linkId
case machine
case plan
case provider
case reason
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(account, forKey: .account)
try container.encodeIfPresent(available, forKey: .available)
try container.encodeIfPresent(billing, forKey: .billing)
try container.encodeIfPresent(headroomPct, forKey: .headroomPct)
try container.encodeIfPresent(host, forKey: .host)
try container.encodeIfPresent(kind, forKey: .kind)
try container.encodeIfPresent(linkId, forKey: .linkId)
try container.encodeIfPresent(machine, forKey: .machine)
try container.encodeIfPresent(plan, forKey: .plan)
try container.encodeIfPresent(provider, forKey: .provider)
try container.encodeIfPresent(reason, forKey: .reason)
}
}