mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
51 lines
1.6 KiB
Swift
51 lines
1.6 KiB
Swift
//
|
|
// ReferenceVersion.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ReferenceVersion: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AsOf is when the oldest of them was current, RFC 3339. */
|
|
public var asOf: String?
|
|
/** Refusal is why it could not be consulted, when it could not. */
|
|
public var refusal: String?
|
|
/** Set is the name the consulted set is addressed by. */
|
|
public var _set: String?
|
|
/** Stale is whether it is past its freshness bound. */
|
|
public var stale: Bool?
|
|
/** Version is every contributing publisher and its content digest. */
|
|
public var version: String?
|
|
|
|
public init(asOf: String? = nil, refusal: String? = nil, _set: String? = nil, stale: Bool? = nil, version: String? = nil) {
|
|
self.asOf = asOf
|
|
self.refusal = refusal
|
|
self._set = _set
|
|
self.stale = stale
|
|
self.version = version
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case asOf
|
|
case refusal
|
|
case _set = "set"
|
|
case stale
|
|
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(refusal, forKey: .refusal)
|
|
try container.encodeIfPresent(_set, forKey: ._set)
|
|
try container.encodeIfPresent(stale, forKey: .stale)
|
|
try container.encodeIfPresent(version, forKey: .version)
|
|
}
|
|
}
|
|
|