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.
53 lines
1.5 KiB
Swift
53 lines
1.5 KiB
Swift
//
|
|
// SpanBody.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct SpanBody: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var duration: Int?
|
|
public var id: String?
|
|
public var kind: String?
|
|
public var parent: String?
|
|
public var status: String?
|
|
public var trace: String?
|
|
|
|
public init(duration: Int? = nil, id: String? = nil, kind: String? = nil, parent: String? = nil, status: String? = nil, trace: String? = nil) {
|
|
self.duration = duration
|
|
self.id = id
|
|
self.kind = kind
|
|
self.parent = parent
|
|
self.status = status
|
|
self.trace = trace
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case duration
|
|
case id
|
|
case kind
|
|
case parent
|
|
case status
|
|
case trace
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(duration, forKey: .duration)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(parent, forKey: .parent)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(trace, forKey: .trace)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension SpanBody: Identifiable {}
|