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.
104 lines
4.0 KiB
Swift
104 lines
4.0 KiB
Swift
//
|
|
// O11yO11yLLMPricingRule.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct O11yO11yLLMPricingRule: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** CreatedAt is when the rule was stored. */
|
|
public var createdAt: Date?
|
|
/** CreatedBy is who created the rule. */
|
|
public var createdBy: String?
|
|
/** Enabled says whether the rule is on. */
|
|
public var enabled: Bool?
|
|
/** ID is the rule's id. */
|
|
public var id: String?
|
|
/** IsOverride marks the rule user-pinned; when true the sync job skips it. */
|
|
public var isOverride: Bool?
|
|
/** Model is the model the rule prices. */
|
|
public var modelName: String?
|
|
/** ModelPattern are the model-name globs the rule matches. */
|
|
public var modelPattern: [String]?
|
|
/** OrgID is the org the rule belongs to. */
|
|
public var orgId: String?
|
|
/** Pricing is the per-unit cost. */
|
|
public var pricing: O11yO11yLLMRulePricing?
|
|
/** Provider is the model's provider. */
|
|
public var provider: String?
|
|
/** SourceID is the upstream source the rule was synced from, when synced. */
|
|
public var sourceId: String?
|
|
/** SyncedAt is when the rule was last synced, when it is synced. */
|
|
public var syncedAt: Date?
|
|
/** Unit is the pricing unit, e.g. per_million_tokens. */
|
|
public var unit: String?
|
|
/** UpdatedAt is when the rule last changed. */
|
|
public var updatedAt: Date?
|
|
/** UpdatedBy is who last changed it. */
|
|
public var updatedBy: String?
|
|
|
|
public init(createdAt: Date? = nil, createdBy: String? = nil, enabled: Bool? = nil, id: String? = nil, isOverride: Bool? = nil, modelName: String? = nil, modelPattern: [String]? = nil, orgId: String? = nil, pricing: O11yO11yLLMRulePricing? = nil, provider: String? = nil, sourceId: String? = nil, syncedAt: Date? = nil, unit: String? = nil, updatedAt: Date? = nil, updatedBy: String? = nil) {
|
|
self.createdAt = createdAt
|
|
self.createdBy = createdBy
|
|
self.enabled = enabled
|
|
self.id = id
|
|
self.isOverride = isOverride
|
|
self.modelName = modelName
|
|
self.modelPattern = modelPattern
|
|
self.orgId = orgId
|
|
self.pricing = pricing
|
|
self.provider = provider
|
|
self.sourceId = sourceId
|
|
self.syncedAt = syncedAt
|
|
self.unit = unit
|
|
self.updatedAt = updatedAt
|
|
self.updatedBy = updatedBy
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case createdAt
|
|
case createdBy
|
|
case enabled
|
|
case id
|
|
case isOverride
|
|
case modelName
|
|
case modelPattern
|
|
case orgId
|
|
case pricing
|
|
case provider
|
|
case sourceId
|
|
case syncedAt
|
|
case unit
|
|
case updatedAt
|
|
case updatedBy
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(createdAt, forKey: .createdAt)
|
|
try container.encodeIfPresent(createdBy, forKey: .createdBy)
|
|
try container.encodeIfPresent(enabled, forKey: .enabled)
|
|
try container.encodeIfPresent(id, forKey: .id)
|
|
try container.encodeIfPresent(isOverride, forKey: .isOverride)
|
|
try container.encodeIfPresent(modelName, forKey: .modelName)
|
|
try container.encodeIfPresent(modelPattern, forKey: .modelPattern)
|
|
try container.encodeIfPresent(orgId, forKey: .orgId)
|
|
try container.encodeIfPresent(pricing, forKey: .pricing)
|
|
try container.encodeIfPresent(provider, forKey: .provider)
|
|
try container.encodeIfPresent(sourceId, forKey: .sourceId)
|
|
try container.encodeIfPresent(syncedAt, forKey: .syncedAt)
|
|
try container.encodeIfPresent(unit, forKey: .unit)
|
|
try container.encodeIfPresent(updatedAt, forKey: .updatedAt)
|
|
try container.encodeIfPresent(updatedBy, forKey: .updatedBy)
|
|
}
|
|
}
|
|
|
|
|
|
@available(iOS 13, tvOS 13, watchOS 6, macOS 10.15, *)
|
|
extension O11yO11yLLMPricingRule: Identifiable {}
|