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.
56 lines
2.3 KiB
Swift
56 lines
2.3 KiB
Swift
//
|
|
// RiskPolicyOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskPolicyOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Changes is how many DISTINCT regimes may be adopted per Window. A restatement identical to the regime in force mints no version and is not counted against it. */
|
|
public var changes: Int64?
|
|
/** Disposed is how many versions retention has taken. It is NOT a silence: a history bounded on disk must say what it no longer holds, because a decision citing a disposed version can no longer be reconstructed from this record. */
|
|
public var disposed: Int64?
|
|
/** History is the retained versions, newest first. */
|
|
public var history: [RiskPolicyVersion]?
|
|
/** Retained is how many versions this organisation's history holds at most, derived from the byte budget its rows are a multiple of. */
|
|
public var retained: Int64?
|
|
/** Version is the version in force — the one every score currently cites. Zero means no regime has ever been stated and the default posture, shadow, is in force. */
|
|
public var version: Int64?
|
|
/** Window is the period Changes is measured over. */
|
|
public var window: String?
|
|
|
|
public init(changes: Int64? = nil, disposed: Int64? = nil, history: [RiskPolicyVersion]? = nil, retained: Int64? = nil, version: Int64? = nil, window: String? = nil) {
|
|
self.changes = changes
|
|
self.disposed = disposed
|
|
self.history = history
|
|
self.retained = retained
|
|
self.version = version
|
|
self.window = window
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case changes
|
|
case disposed
|
|
case history
|
|
case retained
|
|
case version
|
|
case window
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(changes, forKey: .changes)
|
|
try container.encodeIfPresent(disposed, forKey: .disposed)
|
|
try container.encodeIfPresent(history, forKey: .history)
|
|
try container.encodeIfPresent(retained, forKey: .retained)
|
|
try container.encodeIfPresent(version, forKey: .version)
|
|
try container.encodeIfPresent(window, forKey: .window)
|
|
}
|
|
}
|
|
|