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.
61 lines
2.5 KiB
Swift
61 lines
2.5 KiB
Swift
//
|
|
// LicensingIssueResponse.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct LicensingIssueResponse: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AppID is the brand this token runs under (\"hanzo\" | \"lux\" | \"zoo\"). The engine refuses a token whose app_id is not the one it was built for. */
|
|
public var appId: String?
|
|
/** Exp is the token's expiry, Unix seconds. */
|
|
public var exp: Int64?
|
|
/** Features are the capability grants copied verbatim from the plan the org bought. The engine enforces exactly these. */
|
|
public var features: [String]?
|
|
/** Bound reports whether a device fingerprint was folded into the token. An unbound token runs on any machine; a bound one runs only on the machine it was bound to. */
|
|
public var fingerprintBound: Bool?
|
|
/** Holder is who the token was issued to. */
|
|
public var holder: String?
|
|
/** Nonce uniquely identifies this token, and is what a per-token revocation names. */
|
|
public var nonce: String?
|
|
/** Token is the signed license, `base64url(payload).base64url(ed25519_sig)`. It is the credential the engine runs on — treat it as a secret. */
|
|
public var token: String?
|
|
|
|
public init(appId: String? = nil, exp: Int64? = nil, features: [String]? = nil, fingerprintBound: Bool? = nil, holder: String? = nil, nonce: String? = nil, token: String? = nil) {
|
|
self.appId = appId
|
|
self.exp = exp
|
|
self.features = features
|
|
self.fingerprintBound = fingerprintBound
|
|
self.holder = holder
|
|
self.nonce = nonce
|
|
self.token = token
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case appId = "app_id"
|
|
case exp
|
|
case features
|
|
case fingerprintBound = "fingerprint_bound"
|
|
case holder
|
|
case nonce
|
|
case token
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(appId, forKey: .appId)
|
|
try container.encodeIfPresent(exp, forKey: .exp)
|
|
try container.encodeIfPresent(features, forKey: .features)
|
|
try container.encodeIfPresent(fingerprintBound, forKey: .fingerprintBound)
|
|
try container.encodeIfPresent(holder, forKey: .holder)
|
|
try container.encodeIfPresent(nonce, forKey: .nonce)
|
|
try container.encodeIfPresent(token, forKey: .token)
|
|
}
|
|
}
|
|
|