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.
49 lines
1.8 KiB
Swift
49 lines
1.8 KiB
Swift
//
|
|
// CodeFile.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct CodeFile: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ID is the file's path RELATIVE to its session's artifact directory, which is also how it is fetched: GET /v1/exec/download/{session}/{id}. */
|
|
public var id: String?
|
|
/** Name is the display name. On an ANSWER it carries the `{session}/{id}` identifier whole, because the client matches on that prefix. */
|
|
public var name: String?
|
|
/** SessionID is the other accepted spelling of the same fact on the way IN. Both are read; whichever is set wins. */
|
|
public var sessionId: String?
|
|
/** StorageSessionID names the session holding the bytes, and is the spelling the answer always uses. */
|
|
public var storageSessionId: String?
|
|
|
|
public init(id: String? = nil, name: String? = nil, sessionId: String? = nil, storageSessionId: String? = nil) {
|
|
self.id = id
|
|
self.name = name
|
|
self.sessionId = sessionId
|
|
self.storageSessionId = storageSessionId
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case id
|
|
case name
|
|
case sessionId = "session_id"
|
|
case storageSessionId = "storage_session_id"
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(sessionId, forKey: .sessionId)
|
|
try container.encodeIfPresent(storageSessionId, forKey: .storageSessionId)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension CodeFile: Identifiable {}
|