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.
89 lines
4.0 KiB
Swift
89 lines
4.0 KiB
Swift
//
|
|
// WireFact.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct WireFact: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** At is when the thing was so, RFC 3339, as the asserter gave it. */
|
|
public var at: String?
|
|
/** By is the identity that filed it — `owner` or `owner/user` — stamped from the validated principal at the write, never from the body. */
|
|
public var by: String?
|
|
/** Confidence in [0,1] as the asserter gave it; absent is 0. It breaks a tie between two assertions equally knowable and decides nothing else. */
|
|
public var confidence: Double?
|
|
/** Entity is the thing described, in the organization's own namespace. */
|
|
public var entity: String?
|
|
/** Evidence points at the record the claim came from. Absent when the asserter gave none. */
|
|
public var evidence: String?
|
|
/** ID is the assertion's content address, minted by the server from what was asserted. Two callers who assert the identical thing land on one ID and one row; changing any asserted field makes a different ID and a second row. */
|
|
public var id: String?
|
|
/** Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. Derived and never supplied, which is what stops history filed today from being backdated into a past read. */
|
|
public var knowable: String?
|
|
/** Names true means the assertion is an edge and Value is an entity. A walk reads only these. */
|
|
public var names: Bool?
|
|
/** Relation is what was asserted of it. */
|
|
public var relation: String?
|
|
/** Seen is when the asserter says it became knowable, RFC 3339. Provenance only — Knowable is what an as-of read is bounded by. */
|
|
public var seen: String?
|
|
/** Source names who asserted, as the caller gave it. This plane ranks no source above another, so it never outweighs a later Knowable. */
|
|
public var source: String?
|
|
/** Value is what the relation points at: another entity's key when Names is true, otherwise a scalar. */
|
|
public var value: String?
|
|
|
|
public init(at: String? = nil, by: String? = nil, confidence: Double? = nil, entity: String? = nil, evidence: String? = nil, id: String? = nil, knowable: String? = nil, names: Bool? = nil, relation: String? = nil, seen: String? = nil, source: String? = nil, value: String? = nil) {
|
|
self.at = at
|
|
self.by = by
|
|
self.confidence = confidence
|
|
self.entity = entity
|
|
self.evidence = evidence
|
|
self.id = id
|
|
self.knowable = knowable
|
|
self.names = names
|
|
self.relation = relation
|
|
self.seen = seen
|
|
self.source = source
|
|
self.value = value
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case at
|
|
case by
|
|
case confidence
|
|
case entity
|
|
case evidence
|
|
case id
|
|
case knowable
|
|
case names
|
|
case relation
|
|
case seen
|
|
case source
|
|
case value
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(by, forKey: .by)
|
|
try container.encodeIfPresent(confidence, forKey: .confidence)
|
|
try container.encodeIfPresent(entity, forKey: .entity)
|
|
try container.encodeIfPresent(evidence, forKey: .evidence)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(knowable, forKey: .knowable)
|
|
try container.encodeIfPresent(names, forKey: .names)
|
|
try container.encodeIfPresent(relation, forKey: .relation)
|
|
try container.encodeIfPresent(seen, forKey: .seen)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(value, forKey: .value)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension WireFact: Identifiable {}
|