Files
swift-sdk/Sources/Hanzo/Models/LicensingPubkeyView.swift
zeekay 0c2f028a8c Generate the Swift client, which this copy did not carry
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.
2026-08-23 10:04:41 -07:00

56 lines
2.1 KiB
Swift

//
// LicensingPubkeyView.swift
//
// Generated by openapi-generator
// https://openapi-generator.tech
//
import Foundation
public struct LicensingPubkeyView: Sendable, Codable, ParameterConvertible, Hashable {
/** Alg is always \"Ed25519\". */
public var alg: String?
/** Keys is the same key as a single-entry JWKS (OKP/Ed25519), for JWKS-shaped consumers. */
public var keys: [LicensingJWK]?
/** Provider names the KMS holding the private half (\"local\" | \"aws\" | ...). \"local\" means a development key — never trust it in production. */
public var provider: String?
/** PublicKey is the 32-byte Ed25519 public key, standard base64. This is the form the engine embeds for offline verification. */
public var publicKey: String?
/** Schema is the license payload schema version this key signs. */
public var schema: Int?
/** TokenFormat states the wire layout so an implementer can verify a token without this service's source. */
public var tokenFormat: String?
public init(alg: String? = nil, keys: [LicensingJWK]? = nil, provider: String? = nil, publicKey: String? = nil, schema: Int? = nil, tokenFormat: String? = nil) {
self.alg = alg
self.keys = keys
self.provider = provider
self.publicKey = publicKey
self.schema = schema
self.tokenFormat = tokenFormat
}
public enum CodingKeys: String, CodingKey, CaseIterable {
case alg
case keys
case provider
case publicKey = "public_key"
case schema
case tokenFormat = "token_format"
}
// Encodable protocol methods
public func encode(to encoder: Encoder) throws {
var container = encoder.container(keyedBy: CodingKeys.self)
try container.encodeIfPresent(alg, forKey: .alg)
try container.encodeIfPresent(keys, forKey: .keys)
try container.encodeIfPresent(provider, forKey: .provider)
try container.encodeIfPresent(publicKey, forKey: .publicKey)
try container.encodeIfPresent(schema, forKey: .schema)
try container.encodeIfPresent(tokenFormat, forKey: .tokenFormat)
}
}