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.
51 lines
2.1 KiB
Swift
51 lines
2.1 KiB
Swift
//
|
|
// RoomWork.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct RoomWork: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Open is how many items are still work: everything whose status does not end it. It is the number a channel header shows. */
|
|
public var _open: Int64?
|
|
/** Room is the room these counts are for, echoed back as it was resolved. */
|
|
public var room: String?
|
|
/** Status is the count per board column, carrying EVERY column this surface knows — an empty column reads 0 rather than being absent, so a caller can render the board without inventing the vocabulary. The keys are the same closed set every other operation here validates against. */
|
|
public var status: [String: Int64]?
|
|
/** Total is every item bound to this room, settled ones included, so Total minus Open is what the room has finished. */
|
|
public var total: Int64?
|
|
/** Updated is when anything in this room's work last moved, in unix seconds. ABSENT when the room has no work at all: zero would read as the epoch, and a room nobody has filed anything in has no last activity rather than an infinitely old one. Total is 0 in exactly that case. */
|
|
public var updated: Int64?
|
|
|
|
public init(_open: Int64? = nil, room: String? = nil, status: [String: Int64]? = nil, total: Int64? = nil, updated: Int64? = nil) {
|
|
self._open = _open
|
|
self.room = room
|
|
self.status = status
|
|
self.total = total
|
|
self.updated = updated
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case _open = "open"
|
|
case room
|
|
case status
|
|
case total
|
|
case updated
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(_open, forKey: ._open)
|
|
try container.encodeIfPresent(room, forKey: .room)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(total, forKey: .total)
|
|
try container.encodeIfPresent(updated, forKey: .updated)
|
|
}
|
|
}
|
|
|