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.
46 lines
1.8 KiB
Swift
46 lines
1.8 KiB
Swift
//
|
|
// ResolveReferenceOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ResolveReferenceOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Answers is one entry per (set, key) consulted. */
|
|
public var answers: [ReferenceAnswer]?
|
|
/** Consulted names the version of every set that took part, so a decision can record precisely what it leaned on. Record this with the decision: it is what makes the decision reproducible a year later. */
|
|
public var consulted: [ReferenceVersion]?
|
|
/** Refused names the consulted sets that could not answer at all. A key that missed in one of these is UNKNOWN, not clean. */
|
|
public var refused: [String]?
|
|
/** Stale names the consulted sets past their freshness bound. Staleness is itself a risk signal — a decision taken against a three-week-old list is a weaker decision, and this is how it knows. */
|
|
public var stale: [String]?
|
|
|
|
public init(answers: [ReferenceAnswer]? = nil, consulted: [ReferenceVersion]? = nil, refused: [String]? = nil, stale: [String]? = nil) {
|
|
self.answers = answers
|
|
self.consulted = consulted
|
|
self.refused = refused
|
|
self.stale = stale
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case answers
|
|
case consulted
|
|
case refused
|
|
case stale
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(answers, forKey: .answers)
|
|
try container.encodeIfPresent(consulted, forKey: .consulted)
|
|
try container.encodeIfPresent(refused, forKey: .refused)
|
|
try container.encodeIfPresent(stale, forKey: .stale)
|
|
}
|
|
}
|
|
|