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.
91 lines
4.8 KiB
Swift
91 lines
4.8 KiB
Swift
//
|
|
// RiskDataset.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskDataset: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** At is when this version last changed state, RFC 3339 UTC. */
|
|
public var at: String?
|
|
/** By is who moved it there: the validated user, or the org itself when the caller is a machine with no user behind it. */
|
|
public var by: String?
|
|
/** Counts is how the rows fall across the splits. */
|
|
public var counts: RiskSplitCounts?
|
|
/** Digest fingerprints the SPEC and the ROWS together. Two materialisations of one spec agree on it or the plane says they do not. */
|
|
public var digest: String?
|
|
/** Name identifies the dataset across all of its versions. */
|
|
public var name: String?
|
|
/** Oversize is how many of the window's subjects this version could NOT carry because their subject identity exceeds the plane's per-subject byte bound. It is on the wire, not only in a log, because it is the one degradation a caller cannot otherwise detect: the rows that are here look complete, and a dataset silently missing a population is a model silently blind to it. Non-zero does not make a version invalid — it makes it a version whose coverage is STATED. Zero is the normal case and omits. */
|
|
public var oversize: Int64?
|
|
/** Refusal names why there are no bytes, when there are none. */
|
|
public var refusal: String?
|
|
/** Running is true while THIS process is materialising the version. A version that is `materializing` and not running was started by a process that is gone — two states the register cannot tell apart, because a register cannot know which processes are alive. */
|
|
public var running: Bool?
|
|
/** Share is the fraction of the window's subjects admitted, in thousandths. 1000 means the whole window fitted under the cap; anything less means the version is a reproducible sample and says by how much. */
|
|
public var share: Int64?
|
|
/** Spec is the bound query this version was built from, exactly as recorded. */
|
|
public var spec: RiskDatasetSpec?
|
|
/** Status is declared, materializing, ready or refused. Only `ready` has bytes, and `ready` is terminal: a published version is never rewritten. */
|
|
public var status: String?
|
|
/** Truncated is true when the row cap bound before the window ran out. The trailing subject is dropped whole when that happens, because half a subject on one side of a split is exactly the leak the grouping prevents. */
|
|
public var truncated: Bool?
|
|
/** Version is which version this is, from 1 and monotone within the dataset. A number is never reused — not even after a disposal, where the next declare continues the count — so \"signups v3\" means one thing forever, which is what makes a model's citation of it checkable. */
|
|
public var version: Int64?
|
|
|
|
public init(at: String? = nil, by: String? = nil, counts: RiskSplitCounts? = nil, digest: String? = nil, name: String? = nil, oversize: Int64? = nil, refusal: String? = nil, running: Bool? = nil, share: Int64? = nil, spec: RiskDatasetSpec? = nil, status: String? = nil, truncated: Bool? = nil, version: Int64? = nil) {
|
|
self.at = at
|
|
self.by = by
|
|
self.counts = counts
|
|
self.digest = digest
|
|
self.name = name
|
|
self.oversize = oversize
|
|
self.refusal = refusal
|
|
self.running = running
|
|
self.share = share
|
|
self.spec = spec
|
|
self.status = status
|
|
self.truncated = truncated
|
|
self.version = version
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case at
|
|
case by
|
|
case counts
|
|
case digest
|
|
case name
|
|
case oversize
|
|
case refusal
|
|
case running
|
|
case share
|
|
case spec
|
|
case status
|
|
case truncated
|
|
case version
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(by, forKey: .by)
|
|
try container.encodeIfPresent(counts, forKey: .counts)
|
|
try container.encodeIfPresent(digest, forKey: .digest)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(oversize, forKey: .oversize)
|
|
try container.encodeIfPresent(refusal, forKey: .refusal)
|
|
try container.encodeIfPresent(running, forKey: .running)
|
|
try container.encodeIfPresent(share, forKey: .share)
|
|
try container.encodeIfPresent(spec, forKey: .spec)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(truncated, forKey: .truncated)
|
|
try container.encodeIfPresent(version, forKey: .version)
|
|
}
|
|
}
|
|
|