mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
71 lines
2.6 KiB
Swift
71 lines
2.6 KiB
Swift
//
|
|
// Top.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Top: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** End is the window's exclusive upper bound, RFC3339 UTC. */
|
|
public var end: String?
|
|
/** Models ranks the window's LLM models by spend — real per-org data. */
|
|
public var models: TopModels?
|
|
/** Products ranks the window's products by revenue. */
|
|
public var products: TopProducts?
|
|
/** Range is the window that was actually applied: 24h, 7d, 30d or custom. */
|
|
public var range: String?
|
|
/** Scope names the tenant these rankings belong to. */
|
|
public var scope: Scope?
|
|
/** Start is the window's inclusive lower bound, RFC3339 UTC. */
|
|
public var start: String?
|
|
/** Pages ranks the paths visitors requested, by pageviews. */
|
|
public var topPages: Breakdown?
|
|
/** Referrers ranks the external domains visitors arrived from, by pageviews. */
|
|
public var topReferrers: Breakdown?
|
|
/** Sources ranks the utm_source campaigns visitors arrived on, by pageviews. */
|
|
public var topSources: Breakdown?
|
|
|
|
public init(end: String? = nil, models: TopModels? = nil, products: TopProducts? = nil, range: String? = nil, scope: Scope? = nil, start: String? = nil, topPages: Breakdown? = nil, topReferrers: Breakdown? = nil, topSources: Breakdown? = nil) {
|
|
self.end = end
|
|
self.models = models
|
|
self.products = products
|
|
self.range = range
|
|
self.scope = scope
|
|
self.start = start
|
|
self.topPages = topPages
|
|
self.topReferrers = topReferrers
|
|
self.topSources = topSources
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case end
|
|
case models
|
|
case products
|
|
case range
|
|
case scope
|
|
case start
|
|
case topPages
|
|
case topReferrers
|
|
case topSources
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(end, forKey: .end)
|
|
try container.encodeIfPresent(models, forKey: .models)
|
|
try container.encodeIfPresent(products, forKey: .products)
|
|
try container.encodeIfPresent(range, forKey: .range)
|
|
try container.encodeIfPresent(scope, forKey: .scope)
|
|
try container.encodeIfPresent(start, forKey: .start)
|
|
try container.encodeIfPresent(topPages, forKey: .topPages)
|
|
try container.encodeIfPresent(topReferrers, forKey: .topReferrers)
|
|
try container.encodeIfPresent(topSources, forKey: .topSources)
|
|
}
|
|
}
|
|
|