mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
288 of hanzoai/ai's 294 operations now declare a response, against 1 before. GET /v1/models, POST /v1/chat/completions, /v1/embeddings, /v1/messages — every address a client actually calls — used to reach this client untyped, because cloud's relay carried an operation's sentence and dropped the shapes it named. It carries both now. Fleet-wide the document goes from 69% to 81% of operations declaring what comes back, which is where the ~208 new models here come from.
118 lines
4.5 KiB
Swift
118 lines
4.5 KiB
Swift
//
|
|
// Connection.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Connection: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var clientIp: String?
|
|
public var clientIpDesc: String?
|
|
public var code: Int?
|
|
public var commandCount: Int?
|
|
public var connectionId: String?
|
|
public var createdTime: String?
|
|
public var creator: String?
|
|
public var endTime: String?
|
|
public var height: Int?
|
|
public var message: String?
|
|
public var mode: String?
|
|
public var name: String?
|
|
public var node: String?
|
|
public var operations: [String]?
|
|
public var owner: String?
|
|
public var _protocol: String?
|
|
public var recording: String?
|
|
public var reviewed: Bool?
|
|
public var startTime: String?
|
|
public var status: String?
|
|
public var userAgent: String?
|
|
public var userAgentDesc: String?
|
|
public var width: Int?
|
|
|
|
public init(clientIp: String? = nil, clientIpDesc: String? = nil, code: Int? = nil, commandCount: Int? = nil, connectionId: String? = nil, createdTime: String? = nil, creator: String? = nil, endTime: String? = nil, height: Int? = nil, message: String? = nil, mode: String? = nil, name: String? = nil, node: String? = nil, operations: [String]? = nil, owner: String? = nil, _protocol: String? = nil, recording: String? = nil, reviewed: Bool? = nil, startTime: String? = nil, status: String? = nil, userAgent: String? = nil, userAgentDesc: String? = nil, width: Int? = nil) {
|
|
self.clientIp = clientIp
|
|
self.clientIpDesc = clientIpDesc
|
|
self.code = code
|
|
self.commandCount = commandCount
|
|
self.connectionId = connectionId
|
|
self.createdTime = createdTime
|
|
self.creator = creator
|
|
self.endTime = endTime
|
|
self.height = height
|
|
self.message = message
|
|
self.mode = mode
|
|
self.name = name
|
|
self.node = node
|
|
self.operations = operations
|
|
self.owner = owner
|
|
self._protocol = _protocol
|
|
self.recording = recording
|
|
self.reviewed = reviewed
|
|
self.startTime = startTime
|
|
self.status = status
|
|
self.userAgent = userAgent
|
|
self.userAgentDesc = userAgentDesc
|
|
self.width = width
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case clientIp
|
|
case clientIpDesc
|
|
case code
|
|
case commandCount
|
|
case connectionId
|
|
case createdTime
|
|
case creator
|
|
case endTime
|
|
case height
|
|
case message
|
|
case mode
|
|
case name
|
|
case node
|
|
case operations
|
|
case owner
|
|
case _protocol = "protocol"
|
|
case recording
|
|
case reviewed
|
|
case startTime
|
|
case status
|
|
case userAgent
|
|
case userAgentDesc
|
|
case width
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(clientIp, forKey: .clientIp)
|
|
try container.encodeIfPresent(clientIpDesc, forKey: .clientIpDesc)
|
|
try container.encodeIfPresent(code, forKey: .code)
|
|
try container.encodeIfPresent(commandCount, forKey: .commandCount)
|
|
try container.encodeIfPresent(connectionId, forKey: .connectionId)
|
|
try container.encodeIfPresent(createdTime, forKey: .createdTime)
|
|
try container.encodeIfPresent(creator, forKey: .creator)
|
|
try container.encodeIfPresent(endTime, forKey: .endTime)
|
|
try container.encodeIfPresent(height, forKey: .height)
|
|
try container.encodeIfPresent(message, forKey: .message)
|
|
try container.encodeIfPresent(mode, forKey: .mode)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(node, forKey: .node)
|
|
try container.encodeIfPresent(operations, forKey: .operations)
|
|
try container.encodeIfPresent(owner, forKey: .owner)
|
|
try container.encodeIfPresent(_protocol, forKey: ._protocol)
|
|
try container.encodeIfPresent(recording, forKey: .recording)
|
|
try container.encodeIfPresent(reviewed, forKey: .reviewed)
|
|
try container.encodeIfPresent(startTime, forKey: .startTime)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(userAgent, forKey: .userAgent)
|
|
try container.encodeIfPresent(userAgentDesc, forKey: .userAgentDesc)
|
|
try container.encodeIfPresent(width, forKey: .width)
|
|
}
|
|
}
|
|
|