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.
46 lines
1.6 KiB
Swift
46 lines
1.6 KiB
Swift
//
|
|
// RiskAggregates.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RiskAggregates: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Bound is the most they can hold. It is a per-organisation bound: at it, this organisation degrades and no other one notices. */
|
|
public var bound: Int64?
|
|
/** Forgotten is how many of its own subjects have been dropped to stay inside that bound. Each one reads as inactive until it is active again. */
|
|
public var forgotten: Int64?
|
|
/** Saturated is whether the bound is binding right now. The two counts are its evidence; this is the state to act on. */
|
|
public var saturated: Bool?
|
|
/** Subjects is how many of this organisation's subjects the aggregates hold. */
|
|
public var subjects: Int64?
|
|
|
|
public init(bound: Int64? = nil, forgotten: Int64? = nil, saturated: Bool? = nil, subjects: Int64? = nil) {
|
|
self.bound = bound
|
|
self.forgotten = forgotten
|
|
self.saturated = saturated
|
|
self.subjects = subjects
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case bound
|
|
case forgotten
|
|
case saturated
|
|
case subjects
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(bound, forKey: .bound)
|
|
try container.encodeIfPresent(forgotten, forKey: .forgotten)
|
|
try container.encodeIfPresent(saturated, forKey: .saturated)
|
|
try container.encodeIfPresent(subjects, forKey: .subjects)
|
|
}
|
|
}
|
|
|