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.
71 lines
2.6 KiB
Swift
71 lines
2.6 KiB
Swift
//
|
|
// LicensingVerifyResponse.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct LicensingVerifyResponse: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** AppID is the brand the token runs under. */
|
|
public var appId: String?
|
|
/** Exp is the token's expiry, Unix seconds. */
|
|
public var exp: Int64?
|
|
/** Features are the capability grants the token carries. */
|
|
public var features: [String]?
|
|
/** Bound reports that the token carries a device binding. */
|
|
public var fingerprintBound: Bool?
|
|
/** Holder is who the token was issued to. */
|
|
public var holder: String?
|
|
/** Nonce uniquely identifies the token. */
|
|
public var nonce: String?
|
|
/** Reason says why an invalid token was rejected. Empty when Valid. */
|
|
public var reason: String?
|
|
/** Revoked reports that the signature was good but the token has been revoked. */
|
|
public var revoked: Bool?
|
|
/** Valid is the single answer: signature, schema, expiry, app and revocation all passed. */
|
|
public var valid: Bool?
|
|
|
|
public init(appId: String? = nil, exp: Int64? = nil, features: [String]? = nil, fingerprintBound: Bool? = nil, holder: String? = nil, nonce: String? = nil, reason: String? = nil, revoked: Bool? = nil, valid: Bool? = nil) {
|
|
self.appId = appId
|
|
self.exp = exp
|
|
self.features = features
|
|
self.fingerprintBound = fingerprintBound
|
|
self.holder = holder
|
|
self.nonce = nonce
|
|
self.reason = reason
|
|
self.revoked = revoked
|
|
self.valid = valid
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case appId = "app_id"
|
|
case exp
|
|
case features
|
|
case fingerprintBound = "fingerprint_bound"
|
|
case holder
|
|
case nonce
|
|
case reason
|
|
case revoked
|
|
case valid
|
|
}
|
|
|
|
// 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(reason, forKey: .reason)
|
|
try container.encodeIfPresent(revoked, forKey: .revoked)
|
|
try container.encodeIfPresent(valid, forKey: .valid)
|
|
}
|
|
}
|
|
|