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.
76 lines
3.1 KiB
Swift
76 lines
3.1 KiB
Swift
//
|
|
// RiskTrial.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskTrial: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Alerted is how many of those it would have raised. */
|
|
public var alerted: Int64?
|
|
/** Curve is the realised alert rate over successive tenths of the history — the learning curve, which says whether the shape settled or is still moving. */
|
|
public var curve: [Double]?
|
|
/** Fit ranks the shape, smaller being better: the relative miss of the stated appetite, plus flat penalties for never warming and for saturating, plus the share of coordinates that were blind. */
|
|
public var fit: Double?
|
|
/** Learned is how many events the shape learned from during the replay. */
|
|
public var learned: Int64?
|
|
/** Realised is what that appetite actually produced. The distance between the two is what the search is searching over. */
|
|
public var realised: Double?
|
|
/** Saturated is whether the appetite could not be honoured by any threshold, which is a shape that alerts on nothing and reads like a quiet one. */
|
|
public var saturated: Bool?
|
|
/** Scored is how many it was able to score. */
|
|
public var scored: Int64?
|
|
/** Stated is the appetite the shape was tried at. */
|
|
public var stated: Double?
|
|
/** Topology is the shape. */
|
|
public var topology: RiskTopology?
|
|
/** Warm is whether the shape learned enough to have an opinion at all over this organisation's whole history. */
|
|
public var warm: Bool?
|
|
|
|
public init(alerted: Int64? = nil, curve: [Double]? = nil, fit: Double? = nil, learned: Int64? = nil, realised: Double? = nil, saturated: Bool? = nil, scored: Int64? = nil, stated: Double? = nil, topology: RiskTopology? = nil, warm: Bool? = nil) {
|
|
self.alerted = alerted
|
|
self.curve = curve
|
|
self.fit = fit
|
|
self.learned = learned
|
|
self.realised = realised
|
|
self.saturated = saturated
|
|
self.scored = scored
|
|
self.stated = stated
|
|
self.topology = topology
|
|
self.warm = warm
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case alerted
|
|
case curve
|
|
case fit
|
|
case learned
|
|
case realised
|
|
case saturated
|
|
case scored
|
|
case stated
|
|
case topology
|
|
case warm
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(alerted, forKey: .alerted)
|
|
try container.encodeIfPresent(curve, forKey: .curve)
|
|
try container.encodeIfPresent(fit, forKey: .fit)
|
|
try container.encodeIfPresent(learned, forKey: .learned)
|
|
try container.encodeIfPresent(realised, forKey: .realised)
|
|
try container.encodeIfPresent(saturated, forKey: .saturated)
|
|
try container.encodeIfPresent(scored, forKey: .scored)
|
|
try container.encodeIfPresent(stated, forKey: .stated)
|
|
try container.encodeIfPresent(topology, forKey: .topology)
|
|
try container.encodeIfPresent(warm, forKey: .warm)
|
|
}
|
|
}
|
|
|