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.
61 lines
2.1 KiB
Swift
61 lines
2.1 KiB
Swift
//
|
|
// O11yO11yErrorDetail.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yO11yErrorDetail: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Code is the machine-readable code. */
|
|
public var code: String?
|
|
/** Errors are further details, one message and its suggestions each. */
|
|
public var errors: [O11yO11yErrorItem]?
|
|
/** Message is the human-readable reason. */
|
|
public var message: String?
|
|
/** Retry says when it is worth trying again, for errors that pass. */
|
|
public var retry: O11yO11yRetry?
|
|
/** Suggestions say what to try instead. */
|
|
public var suggestions: [String]?
|
|
/** Type is the error's category, e.g. invalid_input, not_found. */
|
|
public var type: String?
|
|
/** Url points at documentation for the error, when there is any. */
|
|
public var url: String?
|
|
|
|
public init(code: String? = nil, errors: [O11yO11yErrorItem]? = nil, message: String? = nil, retry: O11yO11yRetry? = nil, suggestions: [String]? = nil, type: String? = nil, url: String? = nil) {
|
|
self.code = code
|
|
self.errors = errors
|
|
self.message = message
|
|
self.retry = retry
|
|
self.suggestions = suggestions
|
|
self.type = type
|
|
self.url = url
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case code
|
|
case errors
|
|
case message
|
|
case retry
|
|
case suggestions
|
|
case type
|
|
case url
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(code, forKey: .code)
|
|
try container.encodeIfPresent(errors, forKey: .errors)
|
|
try container.encodeIfPresent(message, forKey: .message)
|
|
try container.encodeIfPresent(retry, forKey: .retry)
|
|
try container.encodeIfPresent(suggestions, forKey: .suggestions)
|
|
try container.encodeIfPresent(type, forKey: .type)
|
|
try container.encodeIfPresent(url, forKey: .url)
|
|
}
|
|
}
|
|
|