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.
51 lines
2.6 KiB
Swift
51 lines
2.6 KiB
Swift
//
|
|
// RiskResolveOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskResolveOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Horizon is the maturity horizon this answer was computed under, IN DAYS — the caller's, or 120 when it stated none. Each event's as-of is its own `at` plus this many days, and that as-of is what decides which assertions were visible to it; an event whose as-of falls after Now is not resolved at all and is counted in Unmatured instead. */
|
|
public var horizon: Int64?
|
|
/** Labels is one entry per named event that BOTH matured and had at least one assertion knowable by its own as-of, in the order the events were named. The three outcomes partition the ask: len(labels) + Unmatured + Unlabelled is the number of DISTINCT events named, an event named twice having been answered once. */
|
|
public var labels: [RiskResolved]?
|
|
/** Now and Horizon echo the observation this answer was computed under. A resolved label without them is a claim nobody can check. */
|
|
public var now: String?
|
|
/** Unlabelled is how many matured events had no assertion knowable by their own as-of. That is the ordinary state of most traffic and it is reported rather than answered as unproductive: manufacturing negatives is how a fraud model comes to describe the incumbent block list. */
|
|
public var unlabelled: Int64?
|
|
/** Unmatured is how many named events had not aged past the horizon. They are not unlabelled — they are not yet ASKABLE, and a supervised training set must exclude them rather than treat them as negatives. */
|
|
public var unmatured: Int64?
|
|
|
|
public init(horizon: Int64? = nil, labels: [RiskResolved]? = nil, now: String? = nil, unlabelled: Int64? = nil, unmatured: Int64? = nil) {
|
|
self.horizon = horizon
|
|
self.labels = labels
|
|
self.now = now
|
|
self.unlabelled = unlabelled
|
|
self.unmatured = unmatured
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case horizon
|
|
case labels
|
|
case now
|
|
case unlabelled
|
|
case unmatured
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(horizon, forKey: .horizon)
|
|
try container.encodeIfPresent(labels, forKey: .labels)
|
|
try container.encodeIfPresent(now, forKey: .now)
|
|
try container.encodeIfPresent(unlabelled, forKey: .unlabelled)
|
|
try container.encodeIfPresent(unmatured, forKey: .unmatured)
|
|
}
|
|
}
|
|
|