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.
66 lines
2.9 KiB
Swift
66 lines
2.9 KiB
Swift
//
|
|
// RoutedRunOut.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RoutedRunOut: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Base is the branch to start FROM. Empty means the repository's default — resolve it on the machine, since the machine is the one holding the clone. */
|
|
public var base: String?
|
|
/** Branch is the ref the run must push its work to, and the ONLY one it is permitted to write: the forge's ref policy refuses anything else from this run's credential. It is decided at dispatch and exists before the work does. */
|
|
public var branch: String?
|
|
/** CloneURL is how to fetch the repository. It carries NO credential — the machine authenticates with the git identity it already holds — which is why this whole shape is safe to hand to a claimed runner. */
|
|
public var cloneUrl: String?
|
|
/** Project is the product slug the run is filed under, so the machine can tag what it produces. Empty when the dispatch named none. */
|
|
public var project: String?
|
|
/** Prompt is the task, in full, as the person wrote it. There is no second field for context. */
|
|
public var prompt: String?
|
|
/** Repo is the repository to work in and CloneURL is how to fetch it. */
|
|
public var repo: String?
|
|
/** SessionID is the live session opened at dispatch; the machine streams its turns into it. */
|
|
public var sessionId: String?
|
|
/** TimeoutSeconds bounds the run on the machine; 0 means the machine's own default. */
|
|
public var timeoutSeconds: Int64?
|
|
|
|
public init(base: String? = nil, branch: String? = nil, cloneUrl: String? = nil, project: String? = nil, prompt: String? = nil, repo: String? = nil, sessionId: String? = nil, timeoutSeconds: Int64? = nil) {
|
|
self.base = base
|
|
self.branch = branch
|
|
self.cloneUrl = cloneUrl
|
|
self.project = project
|
|
self.prompt = prompt
|
|
self.repo = repo
|
|
self.sessionId = sessionId
|
|
self.timeoutSeconds = timeoutSeconds
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case base
|
|
case branch
|
|
case cloneUrl
|
|
case project
|
|
case prompt
|
|
case repo
|
|
case sessionId
|
|
case timeoutSeconds
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(base, forKey: .base)
|
|
try container.encodeIfPresent(branch, forKey: .branch)
|
|
try container.encodeIfPresent(cloneUrl, forKey: .cloneUrl)
|
|
try container.encodeIfPresent(project, forKey: .project)
|
|
try container.encodeIfPresent(prompt, forKey: .prompt)
|
|
try container.encodeIfPresent(repo, forKey: .repo)
|
|
try container.encodeIfPresent(sessionId, forKey: .sessionId)
|
|
try container.encodeIfPresent(timeoutSeconds, forKey: .timeoutSeconds)
|
|
}
|
|
}
|
|
|