mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
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.
65 lines
2.3 KiB
Swift
65 lines
2.3 KiB
Swift
//
|
|
// LicensingDeviceSignals.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct LicensingDeviceSignals: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
public var arch: String?
|
|
/** CPUID is a CPU/board identifier string. */
|
|
public var cpuid: String?
|
|
/** DiskSerial of the boot/root volume. */
|
|
public var diskSerial: String?
|
|
/** Hostname is a weak signal, used only as a tiebreaker. */
|
|
public var hostname: String?
|
|
/** InstallID is a per-install random the agent persists locally on first run. */
|
|
public var installId: String?
|
|
/** MachineID is a stable per-host id (e.g. /etc/machine-id, IOPlatformUUID, MachineGuid). Strongest single signal where present. */
|
|
public var machineId: String?
|
|
/** MAC addresses of stable interfaces (order-insensitive; we sort). */
|
|
public var macs: [String]?
|
|
/** OS / Arch coarse platform tags. */
|
|
public var os: String?
|
|
|
|
public init(arch: String? = nil, cpuid: String? = nil, diskSerial: String? = nil, hostname: String? = nil, installId: String? = nil, machineId: String? = nil, macs: [String]? = nil, os: String? = nil) {
|
|
self.arch = arch
|
|
self.cpuid = cpuid
|
|
self.diskSerial = diskSerial
|
|
self.hostname = hostname
|
|
self.installId = installId
|
|
self.machineId = machineId
|
|
self.macs = macs
|
|
self.os = os
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case arch
|
|
case cpuid
|
|
case diskSerial = "disk_serial"
|
|
case hostname
|
|
case installId = "install_id"
|
|
case machineId = "machine_id"
|
|
case macs
|
|
case os
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(arch, forKey: .arch)
|
|
try container.encodeIfPresent(cpuid, forKey: .cpuid)
|
|
try container.encodeIfPresent(diskSerial, forKey: .diskSerial)
|
|
try container.encodeIfPresent(hostname, forKey: .hostname)
|
|
try container.encodeIfPresent(installId, forKey: .installId)
|
|
try container.encodeIfPresent(machineId, forKey: .machineId)
|
|
try container.encodeIfPresent(macs, forKey: .macs)
|
|
try container.encodeIfPresent(os, forKey: .os)
|
|
}
|
|
}
|
|
|