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.3 KiB
Swift
41 lines
1.3 KiB
Swift
//
|
|
// Recharge.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct Recharge: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Charged is how many of them were actually charged. It is at most Orgs, and the difference is orgs whose balance was already above their threshold. */
|
|
public var charged: Int64?
|
|
/** Orgs is how many orgs the sweep considered — every org with auto-recharge armed, whether or not it needed charging. */
|
|
public var orgs: Int64?
|
|
/** Results is one row per org considered, so a sweep that charged nobody is still explainable. Never null. */
|
|
public var results: [Recharged]?
|
|
|
|
public init(charged: Int64? = nil, orgs: Int64? = nil, results: [Recharged]? = nil) {
|
|
self.charged = charged
|
|
self.orgs = orgs
|
|
self.results = results
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case charged
|
|
case orgs
|
|
case results
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(charged, forKey: .charged)
|
|
try container.encodeIfPresent(orgs, forKey: .orgs)
|
|
try container.encodeIfPresent(results, forKey: .results)
|
|
}
|
|
}
|
|
|