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.
50 lines
1.6 KiB
Swift
50 lines
1.6 KiB
Swift
//
|
|
// O11yAvailabilityResponse.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yAvailabilityResponse: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var range: O11yAvailabilityResponseRange?
|
|
/** Series is the trend, oldest bucket first. */
|
|
public var series: [O11yAvailabilityPoint]?
|
|
/** Services is the current inventory, sorted by name so two reads of an unchanged fleet are byte-identical. */
|
|
public var services: [O11yServiceUp]?
|
|
/** Total is how many services the prober currently watches. */
|
|
public var total: Int64?
|
|
/** Up is how many services are up right now. */
|
|
public var up: Int64?
|
|
|
|
public init(range: O11yAvailabilityResponseRange? = nil, series: [O11yAvailabilityPoint]? = nil, services: [O11yServiceUp]? = nil, total: Int64? = nil, up: Int64? = nil) {
|
|
self.range = range
|
|
self.series = series
|
|
self.services = services
|
|
self.total = total
|
|
self.up = up
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case range
|
|
case series
|
|
case services
|
|
case total
|
|
case up
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(range, forKey: .range)
|
|
try container.encodeIfPresent(series, forKey: .series)
|
|
try container.encodeIfPresent(services, forKey: .services)
|
|
try container.encodeIfPresent(total, forKey: .total)
|
|
try container.encodeIfPresent(up, forKey: .up)
|
|
}
|
|
}
|
|
|