mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
48 lines
1.6 KiB
Swift
48 lines
1.6 KiB
Swift
//
|
|
// EventIn.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct EventIn: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Actor is who produced the turn. Empty takes the validated caller, which is what an agent writing its own transcript wants; naming one is for a surface recording on somebody else's behalf. */
|
|
public var actor: String?
|
|
/** ID is the session to append to, from the path. */
|
|
public var id: String?
|
|
/** Kind is what this turn IS: message, tool-call, spawn, log, status, control or progress. Anything else is refused — the vocabulary is closed so a reader can branch on it. */
|
|
public var kind: String?
|
|
public var payload: JSONValue?
|
|
|
|
public init(actor: String? = nil, id: String? = nil, kind: String? = nil, payload: JSONValue? = nil) {
|
|
self.actor = actor
|
|
self.id = id
|
|
self.kind = kind
|
|
self.payload = payload
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case actor
|
|
case id
|
|
case kind
|
|
case payload
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(actor, forKey: .actor)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(kind, forKey: .kind)
|
|
try container.encodeIfPresent(payload, forKey: .payload)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension EventIn: Identifiable {}
|