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.
66 lines
3.0 KiB
Swift
66 lines
3.0 KiB
Swift
//
|
|
// GraphResolveOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct GraphResolveOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AsOf is the instant this answer was taken at, RFC 3339: the one asked for, or the server's clock when none was. */
|
|
public var asOf: String?
|
|
/** Conflicts is every OTHER assertion knowable at AsOf, strongest first. They are not all disagreements: one that repeats the winner's value ranks below it and is listed here too. */
|
|
public var conflicts: [WireFact]?
|
|
/** Contested is true when at least one conflict claims a value different from the winner's. Any number of conflicts that all agree leaves it false. */
|
|
public var contested: Bool?
|
|
/** Entity is the entity the question named, echoed so a stored answer still says what it is about. */
|
|
public var entity: String?
|
|
/** Known is false when this plane held nothing knowable at AsOf. That is an answer, not an error. */
|
|
public var known: Bool?
|
|
/** Relation is the relation the question named, echoed for the same reason. */
|
|
public var relation: String?
|
|
/** Truncated says this pair holds more assertions than one read returns, so the winner was decided from the most recent ceiling-full of them. It is reported because a provenance plane that trims silently is a plane that answers confidently and wrongly; narrow the question with as_of to see what it dropped. */
|
|
public var truncated: Bool?
|
|
/** Winner is the assertion in force — the strongest of those knowable at AsOf under the order `rule` names. Absent exactly when Known is false. */
|
|
public var winner: WireFact?
|
|
|
|
public init(asOf: String? = nil, conflicts: [WireFact]? = nil, contested: Bool? = nil, entity: String? = nil, known: Bool? = nil, relation: String? = nil, truncated: Bool? = nil, winner: WireFact? = nil) {
|
|
self.asOf = asOf
|
|
self.conflicts = conflicts
|
|
self.contested = contested
|
|
self.entity = entity
|
|
self.known = known
|
|
self.relation = relation
|
|
self.truncated = truncated
|
|
self.winner = winner
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case asOf = "as_of"
|
|
case conflicts
|
|
case contested
|
|
case entity
|
|
case known
|
|
case relation
|
|
case truncated
|
|
case winner
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(asOf, forKey: .asOf)
|
|
try container.encodeIfPresent(conflicts, forKey: .conflicts)
|
|
try container.encodeIfPresent(contested, forKey: .contested)
|
|
try container.encodeIfPresent(entity, forKey: .entity)
|
|
try container.encodeIfPresent(known, forKey: .known)
|
|
try container.encodeIfPresent(relation, forKey: .relation)
|
|
try container.encodeIfPresent(truncated, forKey: .truncated)
|
|
try container.encodeIfPresent(winner, forKey: .winner)
|
|
}
|
|
}
|
|
|