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

91 lines
4.0 KiB
Swift

//
// ReferenceAnswer.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ReferenceAnswer: Sendable, Codable, ParameterConvertible, Hashable {
/** Age is how old that is, as a duration. */
public var age: String?
/** AsOf is when the oldest contributing publisher was current, RFC 3339. */
public var asOf: String?
/** From is override or baseline — which plane answered. */
public var from: String?
/** Hit is whether the key is a member. It is meaningful ONLY when Refusal is empty: false with a refusal means the set could not be consulted, which is not the same as the key being clean. */
public var hit: Bool?
/** Key is the key as asked. */
public var key: String?
/** Matched is the member that covered the key, which for a domain or a network is the enclosing entry rather than the key itself. */
public var matched: String?
/** Refusal is why the set could not be consulted, when it could not: never loaded, held elsewhere, or a source we hold no licence for. Non-empty means Hit must not be read as an answer. */
public var refusal: String?
/** Score is the published risk weight where the source expresses one. */
public var score: Double?
/** Set is the set consulted. */
public var _set: String?
/** Stale is whether the set is past its freshness bound. A stale set still answers — yesterday's list beats none — and this is how a decision knows it leaned on one. */
public var stale: Bool?
/** Value is what the publisher says about the member — class, operator, scheme, region. */
public var value: [String: String]?
/** Verdict is the tenant's own allow or deny, present only for an override. The baseline never carries one: it states facts and leaves the decision to the caller's policy. */
public var verdict: String?
/** Version is the exact baseline version consulted, composed of each contributing publisher and its content digest. It is what makes a decision reproducible: an auditor takes this string and knows precisely what was consulted. */
public var version: String?
public init(age: String? = nil, asOf: String? = nil, from: String? = nil, hit: Bool? = nil, key: String? = nil, matched: String? = nil, refusal: String? = nil, score: Double? = nil, _set: String? = nil, stale: Bool? = nil, value: [String: String]? = nil, verdict: String? = nil, version: String? = nil) {
self.age = age
self.asOf = asOf
self.from = from
self.hit = hit
self.key = key
self.matched = matched
self.refusal = refusal
self.score = score
self._set = _set
self.stale = stale
self.value = value
self.verdict = verdict
self.version = version
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case age
case asOf
case from
case hit
case key
case matched
case refusal
case score
case _set = "set"
case stale
case value
case verdict
case version
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(age, forKey: .age)
try container.encodeIfPresent(asOf, forKey: .asOf)
try container.encodeIfPresent(from, forKey: .from)
try container.encodeIfPresent(hit, forKey: .hit)
try container.encodeIfPresent(key, forKey: .key)
try container.encodeIfPresent(matched, forKey: .matched)
try container.encodeIfPresent(refusal, forKey: .refusal)
try container.encodeIfPresent(score, forKey: .score)
try container.encodeIfPresent(_set, forKey: ._set)
try container.encodeIfPresent(stale, forKey: .stale)
try container.encodeIfPresent(value, forKey: .value)
try container.encodeIfPresent(verdict, forKey: .verdict)
try container.encodeIfPresent(version, forKey: .version)
}
}