Files
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

94 lines
5.0 KiB
Swift

//
// GpuJob.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct GpuJob: Sendable, Codable, ParameterConvertible, Hashable {
/** Attempt is which try this is, counting from 1. Above 1 means the job was retried after a failed or abandoned run. */
public var attempt: Int64?
/** CloseTime is when the job reached a terminal state, RFC 3339. Empty means it is still live — queued, running or stalled. */
public var closeTime: String?
/** FailureCause is the engine's reason the job failed. Empty unless it did. */
public var failureCause: String?
/** GPU is the node this job is aimed AT — the lane \"gpu:<node>\" it was submitted on. Empty means the shared any-GPU lane: it was not aimed anywhere and the first free worker takes it. */
public var gpu: String?
/** ID is the job's id, and the id the cancel route takes. The dispatcher sets it equal to the render's prompt id, so it is the same value the studio knows the job by. */
public var id: String?
/** Label is the cheap human name for the render — the output filename prefix lifted out of the submitted graph. Empty when the graph carried none. The graph itself is never in this list; the tasks describe endpoint serves it. */
public var label: String?
/** LastHeartbeat is the claiming worker's most recent beat on this job, RFC 3339 — the evidence a long render is still alive rather than wedged. */
public var lastHeartbeat: String?
/** LeaseExpiry is when the worker's claim lapses, RFC 3339. Past it with the job still STARTED, the claimant is presumed dead and Status reads \"stalled\". */
public var leaseExpiry: String?
/** RunID identifies this execution of the job. It equals ID for a job the dispatcher submitted, which is why a cancel that omits it still works. */
public var runId: String?
/** StartTime is when a worker began executing the job, RFC 3339. Empty while it is still queued. */
public var startTime: String?
/** Status is the job's lifecycle state: queued, running, completed, failed or canceled — plus \"stalled\", which is this surface's own reading of a job that is STARTED whose worker died: its lease has elapsed and no reaper has taken it back yet. Without it such a job reads \"running\" forever. An engine state this surface does not recognize passes through lower-cased rather than being coerced into one of these. */
public var status: String?
/** Type is the work being done (\"studio.render\") — what the claiming worker has to be able to execute. */
public var type: String?
/** Worker is the node that actually CLAIMED the job, which is not always the one it was aimed at: a shared-lane job has no GPU but does have a Worker once picked up. Empty while the job is still waiting. */
public var worker: String?
public init(attempt: Int64? = nil, closeTime: String? = nil, failureCause: String? = nil, gpu: String? = nil, id: String? = nil, label: String? = nil, lastHeartbeat: String? = nil, leaseExpiry: String? = nil, runId: String? = nil, startTime: String? = nil, status: String? = nil, type: String? = nil, worker: String? = nil) {
self.attempt = attempt
self.closeTime = closeTime
self.failureCause = failureCause
self.gpu = gpu
self.id = id
self.label = label
self.lastHeartbeat = lastHeartbeat
self.leaseExpiry = leaseExpiry
self.runId = runId
self.startTime = startTime
self.status = status
self.type = type
self.worker = worker
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case attempt
case closeTime
case failureCause
case gpu
case id
case label
case lastHeartbeat
case leaseExpiry
case runId
case startTime
case status
case type
case worker
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(attempt, forKey: .attempt)
try container.encodeIfPresent(closeTime, forKey: .closeTime)
try container.encodeIfPresent(failureCause, forKey: .failureCause)
try container.encodeIfPresent(gpu, forKey: .gpu)
try container.encodeIfPresent(id, forKey: .id)
try container.encodeIfPresent(label, forKey: .label)
try container.encodeIfPresent(lastHeartbeat, forKey: .lastHeartbeat)
try container.encodeIfPresent(leaseExpiry, forKey: .leaseExpiry)
try container.encodeIfPresent(runId, forKey: .runId)
try container.encodeIfPresent(startTime, forKey: .startTime)
try container.encodeIfPresent(status, forKey: .status)
try container.encodeIfPresent(type, forKey: .type)
try container.encodeIfPresent(worker, forKey: .worker)
}
}
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
extension GpuJob: Identifiable {}