mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
69 lines
3.7 KiB
Swift
69 lines
3.7 KiB
Swift
//
|
|
// PatchSessionIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct PatchSessionIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Cwd is where the session is working NOW. It was write-once — captured at register and never again — which is right for a run that starts in a directory and stays there, and wrong for a linked shell, which is a place a person moves around in. The console showed the directory `hanzo link` happened to be run from and kept showing it after the shell had walked away, so the field answered \"which work is this\" with an answer that was true once. A pointer, so an unchanged path is an omitted field rather than a repeated write. */
|
|
public var cwd: String?
|
|
/** ID is the session to update, from the path. */
|
|
public var id: String?
|
|
/** Project tags the product this session built; Published is the author's decision to let anyone read the story (provenance.go). Both are pointers so \"absent\" and \"cleared\" are different requests. */
|
|
public var project: String?
|
|
/** Published opens the session's story to the public build route; false withdraws it, and withdrawing is always allowed. PUBLISHING is refused unless the session names a Project — the one set in this same request, or the one already stored — because that route is keyed on (org, project). It widens READ access to what is already there and grants nothing else. */
|
|
public var published: Bool?
|
|
/** Status moves the session to running, paused, done or error. A session that has already finished refuses any change with 409 — done and error are monotonic — and moving INTO one stamps the end time. This is the surface REPORTING what happened; a control command never writes it. */
|
|
public var status: String?
|
|
/** Target re-dispatches a session to a run-target (the #48 association). \"\" detaches. */
|
|
public var target: String?
|
|
/** Terminal publishes (or, with \"\", withdraws) the URL this session's live terminal can be watched at. A pointer so \"absent\" and \"withdrawn\" are different requests: a session that stops sharing must be able to say so. */
|
|
public var terminal: String?
|
|
/** Title rewrites the human line, up to 512 characters — usually because the work turned out to be something other than what it was opened as. */
|
|
public var title: String?
|
|
|
|
public init(cwd: String? = nil, id: String? = nil, project: String? = nil, published: Bool? = nil, status: String? = nil, target: String? = nil, terminal: String? = nil, title: String? = nil) {
|
|
self.cwd = cwd
|
|
self.id = id
|
|
self.project = project
|
|
self.published = published
|
|
self.status = status
|
|
self.target = target
|
|
self.terminal = terminal
|
|
self.title = title
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case cwd
|
|
case id
|
|
case project
|
|
case published
|
|
case status
|
|
case target
|
|
case terminal
|
|
case title
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(cwd, forKey: .cwd)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(project, forKey: .project)
|
|
try container.encodeIfPresent(published, forKey: .published)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
try container.encodeIfPresent(target, forKey: .target)
|
|
try container.encodeIfPresent(terminal, forKey: .terminal)
|
|
try container.encodeIfPresent(title, forKey: .title)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension PatchSessionIn: Identifiable {}
|