Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

79 lines
4.2 KiB
Swift

//
// RiskSearchReport.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct RiskSearchReport: Sendable, Codable, ParameterConvertible, Hashable {
/** Done is false while the run is still going; the trials below are then the ones finished so far. */
public var done: Bool?
/** Ended is when it finished, RFC 3339. Absent while it is still going. */
public var ended: String?
/** Events is how much of this organisation's history was replayed. */
public var events: Int64?
/** Fitted is the winning shape FITTED over your own history and published as one of your organisation's own model values. Name its address on PUT /v1/risk/state/model and the winning shape becomes the model you are running. It is why this op answers something you can act on. A trial keeps counts and not the model that produced them, so a report without this named a shape nobody could install — and the adoption path refused a shape change besides. Fitting the winner once is a sixty-fifth pass over the same history; keeping all sixty-four fitted models resident instead would cost a measured 21 MiB per run for sixty-three shapes nobody adopts. Two things about it are worth knowing before you adopt it. Its realised rate can differ from the winner's above, because the ranking measures every candidate under one fixed reference geometry so the comparison is a comparison, while this is fitted under YOUR geometry — the one an outsider cannot predict. And it has learned the window this search replayed and nothing older, so adopting it trades history for fit. */
public var fitted: RiskModelValue?
/** Gap says why the winning shape could not be fitted into an adoptable value, when it could not. It is separate from Refusal because they are different facts: a refusal means the ranking below proves nothing, a gap means the ranking stands and only the value is missing. */
public var gap: String?
/** ID is the run. */
public var id: String?
/** Refusal says why the run proves nothing, when it does. An empty history is REFUSED rather than reported as zero alerts: \"no alerts\" is exactly what a quiet model looks like, and choosing a shape on the strength of an empty replay is the failure a sandbox exists to prevent. */
public var refusal: String?
/** Started is when the run was accepted, RFC 3339. */
public var started: String?
/** Trials is every shape tried, best first. */
public var trials: [RiskTrial]?
/** Winner is the best-fitting shape, absent when nothing fit. */
public var winner: RiskTrial?
public init(done: Bool? = nil, ended: String? = nil, events: Int64? = nil, fitted: RiskModelValue? = nil, gap: String? = nil, id: String? = nil, refusal: String? = nil, started: String? = nil, trials: [RiskTrial]? = nil, winner: RiskTrial? = nil) {
self.done = done
self.ended = ended
self.events = events
self.fitted = fitted
self.gap = gap
self.id = id
self.refusal = refusal
self.started = started
self.trials = trials
self.winner = winner
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case done
case ended
case events
case fitted
case gap
case id
case refusal
case started
case trials
case winner
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(done, forKey: .done)
try container.encodeIfPresent(ended, forKey: .ended)
try container.encodeIfPresent(events, forKey: .events)
try container.encodeIfPresent(fitted, forKey: .fitted)
try container.encodeIfPresent(gap, forKey: .gap)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(refusal, forKey: .refusal)
try container.encodeIfPresent(started, forKey: .started)
try container.encodeIfPresent(trials, forKey: .trials)
try container.encodeIfPresent(winner, forKey: .winner)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension RiskSearchReport: Identifiable {}