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

61 lines
2.2 KiB
Swift

//
// TrafficCaller.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct TrafficCaller: Sendable, Codable, ParameterConvertible, Hashable {
/** Action is the verdict currently held against it, if any. */
public var action: String?
/** Cred is the caller's key: a credential fingerprint (a per-process one-way digest, not a key) for a validated caller, and \"ip:<addr>\" for one that presented no credential we could validate. */
public var cred: String?
/** Failures is how many ended 401 or 403. */
public var failures: Int64?
/** HeldUntil is when the held verdict lapses, unix seconds. */
public var heldUntil: Int64?
/** Paths is the approximate number of distinct paths it touched (max 64). */
public var paths: Int64?
/** Reason is why that verdict was reached. */
public var reason: String?
/** Requests is its request count in the window. */
public var requests: Int64?
public init(action: String? = nil, cred: String? = nil, failures: Int64? = nil, heldUntil: Int64? = nil, paths: Int64? = nil, reason: String? = nil, requests: Int64? = nil) {
self.action = action
self.cred = cred
self.failures = failures
self.heldUntil = heldUntil
self.paths = paths
self.reason = reason
self.requests = requests
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case action
case cred
case failures
case heldUntil = "held_until"
case paths
case reason
case requests
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(action, forKey: .action)
try container.encodeIfPresent(cred, forKey: .cred)
try container.encodeIfPresent(failures, forKey: .failures)
try container.encodeIfPresent(heldUntil, forKey: .heldUntil)
try container.encodeIfPresent(paths, forKey: .paths)
try container.encodeIfPresent(reason, forKey: .reason)
try container.encodeIfPresent(requests, forKey: .requests)
}
}