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

64 lines
3.0 KiB
Swift

//
// RiskEvent.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct RiskEvent: Sendable, Codable, ParameterConvertible, Hashable {
/** At is when it happened, RFC 3339. Empty means now. It must sit inside the thirty-day window the aggregates keep and no more than two minutes ahead of this plane's clock; anything outside that is REFUSED rather than quietly accepted, because a future timestamp moves the aggregates' leading edge and leaves every later event for that subject reading as though it never happened. History older than the window is folded in from your own event surface, not through this endpoint. */
public var at: String?
/** Device is the device fingerprint, if any. It is the axis that surfaces several nominally unrelated subjects acting as one. */
public var device: String?
/** ID is the caller's own stable identifier for the event. It selects the below-the-line review sample by hash, so a counter would make the sample steerable — use the id the event already has. */
public var id: String?
/** Kind is whose behaviour this is: person, session or account. It namespaces the subject, so a person and an account that share an identifier stay two subjects. */
public var kind: String?
/** Nano is the value moved, in nano-USD. Omit it for an event that moves no money: the value features then read BLIND rather than being told the amount was zero, and the difference is reported on the model state. */
public var nano: Int64?
/** Peer is the counterparty, if any. It is an aggregation axis of its own — \"unfamiliar\" is a fact about a relationship and not about either party. */
public var peer: String?
/** Subject is the identifier on that kind. */
public var subject: String?
public init(at: String? = nil, device: String? = nil, id: String? = nil, kind: String? = nil, nano: Int64? = nil, peer: String? = nil, subject: String? = nil) {
self.at = at
self.device = device
self.id = id
self.kind = kind
self.nano = nano
self.peer = peer
self.subject = subject
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case at
case device
case id
case kind
case nano
case peer
case subject
}
// 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(device, forKey: .device)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(kind, forKey: .kind)
try container.encodeIfPresent(nano, forKey: .nano)
try container.encodeIfPresent(peer, forKey: .peer)
try container.encodeIfPresent(subject, forKey: .subject)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension RiskEvent: Identifiable {}