mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
66 lines
2.9 KiB
Swift
66 lines
2.9 KiB
Swift
//
|
|
// ReferenceSource.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ReferenceSource: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AsOf is when this publisher was current, RFC 3339. */
|
|
public var asOf: String?
|
|
/** Basis is the KIND of permission this publisher's data reaches you under: licence (an explicit grant), registry (the registry of record publishing for anyone to consult), operator (an operator's own machine-readable statement about its own network, published for third parties to filter by — not a licence, and not claimed as one), own (computed here), or none (nothing reaches you: the membership is held by the component that screens against it). It is on the wire so the licence position is an audit you can run. */
|
|
public var basis: String?
|
|
/** Keys is how many members this publisher contributed. */
|
|
public var keys: Int64?
|
|
/** Origin is exactly where it was taken from, so it can be taken again. */
|
|
public var origin: String?
|
|
/** Refusal is why this publisher's last take failed, if it did. The set keeps its previous version of this source and ages out visibly rather than silently shrinking. */
|
|
public var refusal: String?
|
|
/** Source is the publisher. */
|
|
public var source: String?
|
|
/** Terms is the CITATION that basis points at — the licence identifier, the registry, or the operator publication. A source with no stated terms is not in the catalog. */
|
|
public var terms: String?
|
|
/** Version is the content digest of what this publisher last supplied. Two refreshes that agree on it took the same data. */
|
|
public var version: String?
|
|
|
|
public init(asOf: String? = nil, basis: String? = nil, keys: Int64? = nil, origin: String? = nil, refusal: String? = nil, source: String? = nil, terms: String? = nil, version: String? = nil) {
|
|
self.asOf = asOf
|
|
self.basis = basis
|
|
self.keys = keys
|
|
self.origin = origin
|
|
self.refusal = refusal
|
|
self.source = source
|
|
self.terms = terms
|
|
self.version = version
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case asOf
|
|
case basis
|
|
case keys
|
|
case origin
|
|
case refusal
|
|
case source
|
|
case terms
|
|
case version
|
|
}
|
|
|
|
// 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(basis, forKey: .basis)
|
|
try container.encodeIfPresent(keys, forKey: .keys)
|
|
try container.encodeIfPresent(origin, forKey: .origin)
|
|
try container.encodeIfPresent(refusal, forKey: .refusal)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(terms, forKey: .terms)
|
|
try container.encodeIfPresent(version, forKey: .version)
|
|
}
|
|
}
|
|
|