Files
swift-sdk/Sources/Hanzo/Models/ControlCommandView.swift
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

45 lines
1.8 KiB
Swift

//
// ControlCommandView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ControlCommandView: Sendable, Codable, ParameterConvertible, Hashable {
/** Command is what was asked, from a closed four: pause, resume, stop, message. It is an INTENT — the poller decides what to do about it, and the session's status changes only when the poller reports back that it did. */
public var command: String?
/** Message is the text that came with the command: what to say into the run for `message`, and the cancellation reason for `stop`. Up to 16 KiB. Empty on a bare pause or resume. */
public var message: String?
public var payload: JSONValue?
/** Seq is this command's position in the session's log — the same monotonic number every other turn is ordered by, so a command sits in the transcript where it was issued. Send the highest one you applied back as `after` and it is never redelivered. */
public var seq: Int64?
public init(command: String? = nil, message: String? = nil, payload: JSONValue? = nil, seq: Int64? = nil) {
self.command = command
self.message = message
self.payload = payload
self.seq = seq
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case command
case message
case payload
case seq
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(command, forKey: .command)
try container.encodeIfPresent(message, forKey: .message)
try container.encodeIfPresent(payload, forKey: .payload)
try container.encodeIfPresent(seq, forKey: .seq)
}
}