mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The projection these were generated from predated the compute migration, so they described /v1/visor — which the API serves at zero paths now. No /v1/visor path survives here.
41 lines
1.5 KiB
Swift
41 lines
1.5 KiB
Swift
//
|
|
// ExecResult.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ExecResult: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** ExitCode is the command's own exit status. A non-zero one is a SUCCESSFUL call carrying a failed command — the HTTP status stays 200, because \"the command failed\" and \"the call failed\" are different facts and a caller has to be able to tell them apart. */
|
|
public var exitCode: Int64?
|
|
/** Stderr is everything it wrote to standard error. It is populated on a successful run too — plenty of tools report progress there — so it is not a signal that anything went wrong; ExitCode is. */
|
|
public var stderr: String?
|
|
/** Stdout is everything the command wrote to standard output, as text. */
|
|
public var stdout: String?
|
|
|
|
public init(exitCode: Int64? = nil, stderr: String? = nil, stdout: String? = nil) {
|
|
self.exitCode = exitCode
|
|
self.stderr = stderr
|
|
self.stdout = stdout
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case exitCode
|
|
case stderr
|
|
case stdout
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(exitCode, forKey: .exitCode)
|
|
try container.encodeIfPresent(stderr, forKey: .stderr)
|
|
try container.encodeIfPresent(stdout, forKey: .stdout)
|
|
}
|
|
}
|
|
|