Files
swift-sdk/Sources/Hanzo/Models/LicensingIssueRequest.swift
zeekay 1df3ddf6bd Regenerate against the document the deployment answers for
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.
2026-09-05 18:55:38 -07:00

56 lines
2.6 KiB
Swift

//
// LicensingIssueRequest.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct LicensingIssueRequest: Sendable, Codable, ParameterConvertible, Hashable {
/** Fingerprint is a previously-registered device binding value, as returned by POST /v1/licensing/fingerprint. Leave it empty and pass Signals to bind the device at issue time instead. */
public var fingerprint: String?
/** Holder overrides who the token is issued to; defaults to the caller's own validated subject. It NAMES the token's bearer and grants nothing on its own — the entitlement checked is always the caller's org's. */
public var holder: String?
/** Product is the licensed commerce product the caller wants a token for. */
public var product: String
/** Release scopes the token to one signed binary release, recorded as a \"release:<id>\" feature so a single bad release can be revoked on its own. */
public var release: String?
/** Signals binds the device at issue time, as an alternative to a pre-registered fingerprint. The raw signals are never stored or echoed — they are folded immediately into the one-way binding value. */
public var signals: LicensingDeviceSignals?
/** TTLSeconds requests a token lifetime in seconds. It is clamped to the deployment maximum AND to the entitlement's own expiry — a token never outlives the subscription that paid for it. */
public var ttlSeconds: Int64?
public init(fingerprint: String? = nil, holder: String? = nil, product: String, release: String? = nil, signals: LicensingDeviceSignals? = nil, ttlSeconds: Int64? = nil) {
self.fingerprint = fingerprint
self.holder = holder
self.product = product
self.release = release
self.signals = signals
self.ttlSeconds = ttlSeconds
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case fingerprint
case holder
case product
case release
case signals
case ttlSeconds = "ttl_seconds"
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(fingerprint, forKey: .fingerprint)
try container.encodeIfPresent(holder, forKey: .holder)
try container.encode(product, forKey: .product)
try container.encodeIfPresent(release, forKey: .release)
try container.encodeIfPresent(signals, forKey: .signals)
try container.encodeIfPresent(ttlSeconds, forKey: .ttlSeconds)
}
}