mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The lock sat at 574d1f1d while the product moved on. The team surface stopped at rooms — no messages path, no way to open one — so anything built on this client had to reach past it with its own HTTP calls, which is the duplication a generated client exists to prevent.
36 lines
1.2 KiB
Swift
36 lines
1.2 KiB
Swift
//
|
|
// Reach.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Reach: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** At is `read`, `unconfigured`, `unreachable` or `refused`. The four values are written out here because this document cannot carry an enum, so the description IS the contract a client reads. Spelling the Go constant names instead would name four identifiers no caller can see. */
|
|
public var at: String?
|
|
/** Why is the upstream's own words, on Unreachable and Refused, and empty otherwise. It is the upstream's and not ours: a failure reported without its reason sends the reader to look at the venue, which is the one place the fault is not. */
|
|
public var why: String?
|
|
|
|
public init(at: String? = nil, why: String? = nil) {
|
|
self.at = at
|
|
self.why = why
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case at
|
|
case why
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(at, forKey: .at)
|
|
try container.encodeIfPresent(why, forKey: .why)
|
|
}
|
|
}
|
|
|