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.
41 lines
1.1 KiB
Swift
41 lines
1.1 KiB
Swift
//
|
|
// Usage.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Usage: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** null — no per-invocation cost source */
|
|
public var costCents: Int64?
|
|
/** one line per function that ran in the window */
|
|
public var series: [CostLine]?
|
|
/** how those invocations ended */
|
|
public var status: StatusBreakdown?
|
|
|
|
public init(costCents: Int64? = nil, series: [CostLine]? = nil, status: StatusBreakdown? = nil) {
|
|
self.costCents = costCents
|
|
self.series = series
|
|
self.status = status
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case costCents
|
|
case series
|
|
case status
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(costCents, forKey: .costCents)
|
|
try container.encodeIfPresent(series, forKey: .series)
|
|
try container.encodeIfPresent(status, forKey: .status)
|
|
}
|
|
}
|
|
|