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.
46 lines
1.8 KiB
Swift
46 lines
1.8 KiB
Swift
//
|
|
// ProgressView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ProgressView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Done counts steps that are FINISHED — done and skipped alike, since a step the org deliberately passed over is not still owed. It therefore rises when somebody skips, which is the intended reading of a checklist. */
|
|
public var done: Int64?
|
|
/** Next is the id of the step to do next: the first available, unfinished step in authoring order. Empty when the journey is complete, and also empty when every remaining step is blocked by a dependency. */
|
|
public var next: String?
|
|
/** Percent is done/total as a whole number 0-100, rounded, so a caller renders a bar without recomputing it. Total zero reads as 0. */
|
|
public var percent: Int64?
|
|
/** Total is how many steps this org's journey holds — the ENABLED steps of the playbook, so it shrinks when an operator disables one and does not match the authored step count. */
|
|
public var total: Int64?
|
|
|
|
public init(done: Int64? = nil, next: String? = nil, percent: Int64? = nil, total: Int64? = nil) {
|
|
self.done = done
|
|
self.next = next
|
|
self.percent = percent
|
|
self.total = total
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case done
|
|
case next
|
|
case percent
|
|
case total
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(done, forKey: .done)
|
|
try container.encodeIfPresent(next, forKey: .next)
|
|
try container.encodeIfPresent(percent, forKey: .percent)
|
|
try container.encodeIfPresent(total, forKey: .total)
|
|
}
|
|
}
|
|
|