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.
56 lines
2.0 KiB
Swift
56 lines
2.0 KiB
Swift
//
|
|
// DeviceView.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct DeviceView: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Accounts is every account the caller has signed in on this machine. */
|
|
public var accounts: [LinkView]?
|
|
/** ActiveSessions is how many agent sessions the caller currently has running on this machine; 0 where the agent plane is not mounted. */
|
|
public var activeSessions: Int64?
|
|
/** Host is the machine's hostname label, from its most-recently-seen account. */
|
|
public var host: String?
|
|
/** LastSeen is when any account on this machine last reported, RFC 3339 UTC. */
|
|
public var lastSeen: String?
|
|
/** Machine is the stable machine identifier. */
|
|
public var machine: String?
|
|
/** OS is the machine's operating system label. */
|
|
public var os: String?
|
|
|
|
public init(accounts: [LinkView]? = nil, activeSessions: Int64? = nil, host: String? = nil, lastSeen: String? = nil, machine: String? = nil, os: String? = nil) {
|
|
self.accounts = accounts
|
|
self.activeSessions = activeSessions
|
|
self.host = host
|
|
self.lastSeen = lastSeen
|
|
self.machine = machine
|
|
self.os = os
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case accounts
|
|
case activeSessions
|
|
case host
|
|
case lastSeen
|
|
case machine
|
|
case os
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(accounts, forKey: .accounts)
|
|
try container.encodeIfPresent(activeSessions, forKey: .activeSessions)
|
|
try container.encodeIfPresent(host, forKey: .host)
|
|
try container.encodeIfPresent(lastSeen, forKey: .lastSeen)
|
|
try container.encodeIfPresent(machine, forKey: .machine)
|
|
try container.encodeIfPresent(os, forKey: .os)
|
|
}
|
|
}
|
|
|