Files
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

131 lines
5.8 KiB
Swift

//
// ReadingReq.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct ReadingReq: Sendable, Codable, ParameterConvertible, Hashable {
/** Account is the provider-side account the sample belongs to. */
public var account: String?
/** CachedInputTokens is the window's cached-prompt-token count. */
public var cachedInputTokens: Int64?
/** Confidence says how real the counters are, as the meter graded itself. */
public var confidence: String?
/** CostCents is the window's spend in cents, as the provider's meter states it. */
public var costCents: Int64?
/** CostLimitCents is the window's spend cap in cents, when the meter knows one. */
public var costLimitCents: Int64?
/** Currency is the ISO currency the cost fields are stated in. */
public var currency: String?
/** InputTokens is the window's prompt-token count. */
public var inputTokens: Int64?
/** Kind is subscription or apikey; anything else is refused. */
public var kind: String?
/** Lane names the meter's own lane label for this measurement. */
public var lane: String?
/** Machine is the machine the collector observed the account on. Required. */
public var machine: String?
/** OutputTokens is the window's completion-token count. */
public var outputTokens: Int64?
/** Plan is the provider plan label the account is on. */
public var plan: String?
/** Provider is the AI provider whose meter reported this sample. Required. */
public var provider: String?
/** Requests is the window's request count. */
public var requests: Int64?
/** ResetsAt is when the window resets, RFC 3339, bounded. */
public var resetsAt: String?
/** Synthetic marks a sample the collector derived rather than observed. */
public var synthetic: Bool?
/** TotalTokens is the window's total token count. */
public var totalTokens: Int64?
/** UsedPct is how much of the window's allowance is consumed, clamped 0..100. */
public var usedPct: Double?
/** Window is the window class, one of 6h, day, week, month; anything else is refused rather than silently reclassified. */
public var window: String?
/** WindowMinutes is the window's length as the meter reported it. */
public var windowMinutes: Int?
/** WindowStart is when the measured window opened, RFC 3339, bounded to a sane interval around now. */
public var windowStart: String?
public init(account: String? = nil, cachedInputTokens: Int64? = nil, confidence: String? = nil, costCents: Int64? = nil, costLimitCents: Int64? = nil, currency: String? = nil, inputTokens: Int64? = nil, kind: String? = nil, lane: String? = nil, machine: String? = nil, outputTokens: Int64? = nil, plan: String? = nil, provider: String? = nil, requests: Int64? = nil, resetsAt: String? = nil, synthetic: Bool? = nil, totalTokens: Int64? = nil, usedPct: Double? = nil, window: String? = nil, windowMinutes: Int? = nil, windowStart: String? = nil) {
self.account = account
self.cachedInputTokens = cachedInputTokens
self.confidence = confidence
self.costCents = costCents
self.costLimitCents = costLimitCents
self.currency = currency
self.inputTokens = inputTokens
self.kind = kind
self.lane = lane
self.machine = machine
self.outputTokens = outputTokens
self.plan = plan
self.provider = provider
self.requests = requests
self.resetsAt = resetsAt
self.synthetic = synthetic
self.totalTokens = totalTokens
self.usedPct = usedPct
self.window = window
self.windowMinutes = windowMinutes
self.windowStart = windowStart
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case account
case cachedInputTokens
case confidence
case costCents
case costLimitCents
case currency
case inputTokens
case kind
case lane
case machine
case outputTokens
case plan
case provider
case requests
case resetsAt
case synthetic
case totalTokens
case usedPct
case window
case windowMinutes
case windowStart
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(account, forKey: .account)
try container.encodeIfPresent(cachedInputTokens, forKey: .cachedInputTokens)
try container.encodeIfPresent(confidence, forKey: .confidence)
try container.encodeIfPresent(costCents, forKey: .costCents)
try container.encodeIfPresent(costLimitCents, forKey: .costLimitCents)
try container.encodeIfPresent(currency, forKey: .currency)
try container.encodeIfPresent(inputTokens, forKey: .inputTokens)
try container.encodeIfPresent(kind, forKey: .kind)
try container.encodeIfPresent(lane, forKey: .lane)
try container.encodeIfPresent(machine, forKey: .machine)
try container.encodeIfPresent(outputTokens, forKey: .outputTokens)
try container.encodeIfPresent(plan, forKey: .plan)
try container.encodeIfPresent(provider, forKey: .provider)
try container.encodeIfPresent(requests, forKey: .requests)
try container.encodeIfPresent(resetsAt, forKey: .resetsAt)
try container.encodeIfPresent(synthetic, forKey: .synthetic)
try container.encodeIfPresent(totalTokens, forKey: .totalTokens)
try container.encodeIfPresent(usedPct, forKey: .usedPct)
try container.encodeIfPresent(window, forKey: .window)
try container.encodeIfPresent(windowMinutes, forKey: .windowMinutes)
try container.encodeIfPresent(windowStart, forKey: .windowStart)
}
}