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.
64 lines
2.1 KiB
Swift
64 lines
2.1 KiB
Swift
//
|
|
// OracleView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct OracleView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Feed is the trading pair this feed prices. */
|
|
public var feed: String?
|
|
/** ID is the feed's own id, else its trading pair. */
|
|
public var id: String?
|
|
/** Name is the feed's display name — the trading pair, e.g. \"LUX/USD\". */
|
|
public var name: String?
|
|
/** Source is the oracle network the feed originates from; \"O-Chain\" by default. */
|
|
public var source: String?
|
|
/** Status is \"active\" for a listed feed. */
|
|
public var status: String?
|
|
/** UpdatedAt is the feed's own timestamp, RFC 3339 UTC. */
|
|
public var updatedAt: String?
|
|
/** Value is the feed's price, verbatim as the registry carries it. */
|
|
public var value: String?
|
|
|
|
public init(feed: String? = nil, id: String? = nil, name: String? = nil, source: String? = nil, status: String? = nil, updatedAt: String? = nil, value: String? = nil) {
|
|
self.feed = feed
|
|
self.id = id
|
|
self.name = name
|
|
self.source = source
|
|
self.status = status
|
|
self.updatedAt = updatedAt
|
|
self.value = value
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case feed
|
|
case id
|
|
case name
|
|
case source
|
|
case status
|
|
case updatedAt
|
|
case value
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(feed, forKey: .feed)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
try container.encodeIfPresent(value, forKey: .value)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension OracleView: Identifiable {}
|