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

56 lines
3.7 KiB
Swift

//
// RiskLabelOut.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct RiskLabelOut: Sendable, Codable, ParameterConvertible, Hashable {
/** Duplicate is how many members this tenant already held, byte for byte. The idempotency key is the assertion's CONTENT digest — kind, subject, at, seen, disposition, source, evidence, the asserting identity and confidence, folded in length-prefixed — so a webhook redelivering one chargeback is a duplicate and costs nothing, while an assertion differing in ANY of those fields is a DIFFERENT assertion and is recorded beside the first. Nothing was written and nothing was overwritten; it is an outcome, never an error. The asserting identity is in the digest, so the same claim filed by a second credential is two assertions and not a redelivery. */
public var duplicate: Int64?
/** Mirror names why the columnar copy did not take this batch, when it did not. The record is already durable in the tenant's own store by then — the warehouse copy exists to make a training join cheap, and its absence is a gap in that join, never a lost label. */
public var mirror: String?
/** Pending is how many assertions the derived copy is still to take. Every write attempt carries the backlog forward as well as its own batch, so a warehouse that was unreachable closes its gap on the next write rather than leaving a hole in a training join nothing would report. It is counted under a cap and saturates there: zero means caught up, and a large number means a backlog to work through rather than an inventory to reconcile. */
public var pending: Int64?
/** Recorded is how many members became a NEW row in the tenant's record. Recorded + Duplicate + Refused is exactly the number of labels sent, so a caller reconciling a webhook delivery can do it on the counts alone. */
public var recorded: Int64?
/** Refused is how many members failed admission and were NOT recorded. Refusal is per member and never discards the rest of the batch: an empty or over-512-byte subject or evidence, a kind, disposition or source outside the closed vocabulary, an `at` or `seen` that is not RFC 3339, a `seen` before the `at` it judges, either instant more than five minutes past the server clock, or a confidence outside [0,1]. Results names which member and why, so the refused ones are exactly the ones to fix and resend. */
public var refused: Int64?
/** Results is per fact, in the order sent, so a caller can retry exactly the members that were refused and can log the content digest of the ones that landed. */
public var results: [RiskLabelResult]?
public init(duplicate: Int64? = nil, mirror: String? = nil, pending: Int64? = nil, recorded: Int64? = nil, refused: Int64? = nil, results: [RiskLabelResult]? = nil) {
self.duplicate = duplicate
self.mirror = mirror
self.pending = pending
self.recorded = recorded
self.refused = refused
self.results = results
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case duplicate
case mirror
case pending
case recorded
case refused
case results
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(duplicate, forKey: .duplicate)
try container.encodeIfPresent(mirror, forKey: .mirror)
try container.encodeIfPresent(pending, forKey: .pending)
try container.encodeIfPresent(recorded, forKey: .recorded)
try container.encodeIfPresent(refused, forKey: .refused)
try container.encodeIfPresent(results, forKey: .results)
}
}