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.5 KiB
Swift
56 lines
2.5 KiB
Swift
//
|
|
// O11yStatusResult.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yStatusResult: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CheckedAt is when this answer was measured, RFC3339 UTC. */
|
|
public var checkedAt: String?
|
|
/** Deployments is the per-replica inventory behind the verdict. Empty means the telemetry store reported none, not that the service runs on none. */
|
|
public var deployments: [O11yDeployment]?
|
|
/** LatencyMs is the health probe's round trip in MILLISECONDS, time-boxed at two seconds. It is 0 when no probe answered, which is not a fast service. */
|
|
public var latencyMs: Int64?
|
|
/** Product is the service this answer is about, echoed back. */
|
|
public var product: String?
|
|
/** Source is where the verdict came from: \"probe\" (we asked and it answered), \"datastore\" (the probe did not answer and the replica inventory decided it), \"unreachable\" (neither), or \"unknown-service\" for a well-formed product name nothing backs — which is answered without probing, since dialling an arbitrary host on a caller's say-so is the request forgery this refuses. */
|
|
public var source: String?
|
|
/** Up is true when the health probe succeeded OR any replica reports up, so a service reachable by either route reads up. Read Source to know which. */
|
|
public var up: Bool?
|
|
|
|
public init(checkedAt: String? = nil, deployments: [O11yDeployment]? = nil, latencyMs: Int64? = nil, product: String? = nil, source: String? = nil, up: Bool? = nil) {
|
|
self.checkedAt = checkedAt
|
|
self.deployments = deployments
|
|
self.latencyMs = latencyMs
|
|
self.product = product
|
|
self.source = source
|
|
self.up = up
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case checkedAt
|
|
case deployments
|
|
case latencyMs
|
|
case product
|
|
case source
|
|
case up
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(checkedAt, forKey: .checkedAt)
|
|
try container.encodeIfPresent(deployments, forKey: .deployments)
|
|
try container.encodeIfPresent(latencyMs, forKey: .latencyMs)
|
|
try container.encodeIfPresent(product, forKey: .product)
|
|
try container.encodeIfPresent(source, forKey: .source)
|
|
try container.encodeIfPresent(up, forKey: .up)
|
|
}
|
|
}
|
|
|