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.
46 lines
1.5 KiB
Swift
46 lines
1.5 KiB
Swift
//
|
|
// TestResult.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct TestResult: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Delivered is whether the subscriber accepted the test POST. It is the whole answer: the send is synchronous and is not retried. */
|
|
public var delivered: Bool?
|
|
/** DurationMs is how long the single attempt took, in MILLISECONDS. */
|
|
public var durationMs: Int64?
|
|
/** Error says what stopped it. Empty when delivered. */
|
|
public var error: String?
|
|
/** HTTPStatus is what the subscriber answered, or 0 if it never answered. */
|
|
public var httpStatus: Int64?
|
|
|
|
public init(delivered: Bool? = nil, durationMs: Int64? = nil, error: String? = nil, httpStatus: Int64? = nil) {
|
|
self.delivered = delivered
|
|
self.durationMs = durationMs
|
|
self.error = error
|
|
self.httpStatus = httpStatus
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case delivered
|
|
case durationMs
|
|
case error
|
|
case httpStatus
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(delivered, forKey: .delivered)
|
|
try container.encodeIfPresent(durationMs, forKey: .durationMs)
|
|
try container.encodeIfPresent(error, forKey: .error)
|
|
try container.encodeIfPresent(httpStatus, forKey: .httpStatus)
|
|
}
|
|
}
|
|
|