mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
81 lines
3.1 KiB
Swift
81 lines
3.1 KiB
Swift
//
|
|
// SessionDisplayInfo.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
#if canImport(AnyCodable)
|
|
import AnyCodable
|
|
#endif
|
|
|
|
public struct SessionDisplayInfo: Codable, JSONEncodable, Hashable {
|
|
|
|
public static let messageCountRule = NumericRule<Int>(minimum: 0, exclusiveMinimum: false, maximum: nil, exclusiveMaximum: false, multipleOf: nil)
|
|
public var accumulatedInputTokens: Int?
|
|
public var accumulatedOutputTokens: Int?
|
|
public var accumulatedTotalTokens: Int?
|
|
public var createdAt: String
|
|
public var id: String
|
|
public var inputTokens: Int?
|
|
public var messageCount: Int
|
|
public var name: String
|
|
public var outputTokens: Int?
|
|
public var scheduleId: String?
|
|
public var totalTokens: Int?
|
|
public var workingDir: String
|
|
|
|
public init(accumulatedInputTokens: Int? = nil, accumulatedOutputTokens: Int? = nil, accumulatedTotalTokens: Int? = nil, createdAt: String, id: String, inputTokens: Int? = nil, messageCount: Int, name: String, outputTokens: Int? = nil, scheduleId: String? = nil, totalTokens: Int? = nil, workingDir: String) {
|
|
self.accumulatedInputTokens = accumulatedInputTokens
|
|
self.accumulatedOutputTokens = accumulatedOutputTokens
|
|
self.accumulatedTotalTokens = accumulatedTotalTokens
|
|
self.createdAt = createdAt
|
|
self.id = id
|
|
self.inputTokens = inputTokens
|
|
self.messageCount = messageCount
|
|
self.name = name
|
|
self.outputTokens = outputTokens
|
|
self.scheduleId = scheduleId
|
|
self.totalTokens = totalTokens
|
|
self.workingDir = workingDir
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case accumulatedInputTokens
|
|
case accumulatedOutputTokens
|
|
case accumulatedTotalTokens
|
|
case createdAt
|
|
case id
|
|
case inputTokens
|
|
case messageCount
|
|
case name
|
|
case outputTokens
|
|
case scheduleId
|
|
case totalTokens
|
|
case workingDir
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(accumulatedInputTokens, forKey: .accumulatedInputTokens)
|
|
try container.encodeIfPresent(accumulatedOutputTokens, forKey: .accumulatedOutputTokens)
|
|
try container.encodeIfPresent(accumulatedTotalTokens, forKey: .accumulatedTotalTokens)
|
|
try container.encode(createdAt, forKey: .createdAt)
|
|
try container.encode(id, forKey: .id)
|
|
try container.encodeIfPresent(inputTokens, forKey: .inputTokens)
|
|
try container.encode(messageCount, forKey: .messageCount)
|
|
try container.encode(name, forKey: .name)
|
|
try container.encodeIfPresent(outputTokens, forKey: .outputTokens)
|
|
try container.encodeIfPresent(scheduleId, forKey: .scheduleId)
|
|
try container.encodeIfPresent(totalTokens, forKey: .totalTokens)
|
|
try container.encode(workingDir, forKey: .workingDir)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension SessionDisplayInfo: Identifiable {}
|