mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
69 lines
3.5 KiB
Swift
69 lines
3.5 KiB
Swift
//
|
|
// O11yStatusIncident.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yStatusIncident: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AffectedComponents is what this incident covers. It is COUNTED rather than classified: some services down is a partial outage and every probed service down is a full one, because deciding that one service is critical and another is not would need a judgement nobody has measured. */
|
|
public var affectedComponents: [O11yStatusComponent]?
|
|
/** CurrentWorstImpact is the incident's impact on the PLATFORM, which is not the same question as the component's own condition above. */
|
|
public var currentWorstImpact: String?
|
|
/** ID is derived from the service, so the same outage keeps one id across reads rather than being reported as a new incident every 15 seconds. */
|
|
public var id: String?
|
|
/** LastUpdateAt is when the failing measurement this incident reports was read, RFC3339 UTC. */
|
|
public var lastUpdateAt: String?
|
|
/** LastUpdateMessage says what was observed, not what is being done about it — there is no operator writing updates here, only the probe that failed. */
|
|
public var lastUpdateMessage: String?
|
|
/** Name is the one-line headline, built from the service that stopped answering. */
|
|
public var name: String?
|
|
/** Status is always \"investigating\" — the member of the client's closed set that means detected, cause not yet established, which is exactly what an automated prober knows. Nothing here ever claims \"identified\": that would assert a diagnosis no measurement made. */
|
|
public var status: String?
|
|
/** URL points at the HUMAN status page, not back at this JSON. Every link in this document goes to the same place. */
|
|
public var url: String?
|
|
|
|
public init(affectedComponents: [O11yStatusComponent]? = nil, currentWorstImpact: String? = nil, id: String? = nil, lastUpdateAt: String? = nil, lastUpdateMessage: String? = nil, name: String? = nil, status: String? = nil, url: String? = nil) {
|
|
self.affectedComponents = affectedComponents
|
|
self.currentWorstImpact = currentWorstImpact
|
|
self.id = id
|
|
self.lastUpdateAt = lastUpdateAt
|
|
self.lastUpdateMessage = lastUpdateMessage
|
|
self.name = name
|
|
self.status = status
|
|
self.url = url
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case affectedComponents = "affected_components"
|
|
case currentWorstImpact = "current_worst_impact"
|
|
case id
|
|
case lastUpdateAt = "last_update_at"
|
|
case lastUpdateMessage = "last_update_message"
|
|
case name
|
|
case status
|
|
case url
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(affectedComponents, forKey: .affectedComponents)
|
|
try container.encodeIfPresent(currentWorstImpact, forKey: .currentWorstImpact)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(lastUpdateAt, forKey: .lastUpdateAt)
|
|
try container.encodeIfPresent(lastUpdateMessage, forKey: .lastUpdateMessage)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension O11yStatusIncident: Identifiable {}
|